From 12ec142a691d807bbd13d11e05a729bf596006a7 Mon Sep 17 00:00:00 2001 From: Ameya Shenoy Date: Wed, 26 Sep 2018 14:05:48 +0530 Subject: [PATCH] fix(multiple): syntax and patch - syntax fix for using super class - check "All Departments" in department name with translations --- erpnext/accounts/doctype/account/account.py | 2 +- .../patches/v11_0/create_department_records_for_each_company.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 635a8c2327..5d504b94be 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -16,7 +16,7 @@ class Account(NestedSet): if frappe.local.flags.ignore_on_update: return else: - super().on_update() + super(Account, self).on_update() def onload(self): frozen_accounts_modifier = frappe.db.get_value("Accounts Settings", "Accounts Settings", diff --git a/erpnext/patches/v11_0/create_department_records_for_each_company.py b/erpnext/patches/v11_0/create_department_records_for_each_company.py index c03cf989a2..eb48eed7a6 100644 --- a/erpnext/patches/v11_0/create_department_records_for_each_company.py +++ b/erpnext/patches/v11_0/create_department_records_for_each_company.py @@ -18,7 +18,7 @@ def execute(): for department in departments: # skip root node - if department.name == _("All Departments"): + if _(department.name) == _("All Departments"): continue # for each company, create a copy of the doc