From 19c0b7a5234b017c7a15e8a7b149d386f85180e6 Mon Sep 17 00:00:00 2001 From: vishnu Date: Wed, 22 Feb 2023 10:24:45 +0000 Subject: [PATCH 1/3] fix: currency in coa import --- .../chart_of_accounts/chart_of_accounts.py | 15 ++++++++++++++- .../chart_of_accounts_importer.py | 6 +++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py index 75f8f0645c..9e67c4cf0d 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py @@ -29,6 +29,7 @@ def create_charts( "root_type", "is_group", "tax_rate", + "account_currency", ]: account_number = cstr(child.get("account_number")).strip() @@ -95,7 +96,17 @@ def identify_is_group(child): is_group = child.get("is_group") elif len( set(child.keys()) - - set(["account_name", "account_type", "root_type", "is_group", "tax_rate", "account_number"]) + - set( + [ + "account_name", + "account_type", + "root_type", + "is_group", + "tax_rate", + "account_number", + "account_currency", + ] + ) ): is_group = 1 else: @@ -185,6 +196,7 @@ def get_account_tree_from_existing_company(existing_company): "root_type", "tax_rate", "account_number", + "account_currency", ], order_by="lft, rgt", ) @@ -267,6 +279,7 @@ def build_tree_from_json(chart_template, chart_data=None, from_coa_importer=Fals "root_type", "is_group", "tax_rate", + "account_currency", ]: continue diff --git a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py index 220b74727b..dd2bd88775 100644 --- a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py +++ b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py @@ -36,7 +36,7 @@ def validate_columns(data): no_of_columns = max([len(d) for d in data]) - if no_of_columns > 7: + if no_of_columns > 8: frappe.throw( _("More columns found than expected. Please compare the uploaded file with standard template"), title=(_("Wrong Template")), @@ -233,6 +233,7 @@ def build_forest(data): is_group, account_type, root_type, + account_currency, ) = i if not account_name: @@ -253,6 +254,8 @@ def build_forest(data): charts_map[account_name]["account_type"] = account_type if root_type: charts_map[account_name]["root_type"] = root_type + if account_currency: + charts_map[account_name]["account_currency"] = account_currency path = return_parent(data, account_name)[::-1] paths.append(path) # List of path is created line_no += 1 @@ -315,6 +318,7 @@ def get_template(template_type): "Is Group", "Account Type", "Root Type", + "account_currency", ] writer = UnicodeWriter() writer.writerow(fields) From e3c000d0bec35542b30811aa3f2f16782210770a Mon Sep 17 00:00:00 2001 From: vishnu Date: Wed, 22 Feb 2023 10:53:11 +0000 Subject: [PATCH 2/3] chore: change column label --- .../chart_of_accounts_importer/chart_of_accounts_importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py index dd2bd88775..cb7da17901 100644 --- a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py +++ b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py @@ -318,7 +318,7 @@ def get_template(template_type): "Is Group", "Account Type", "Root Type", - "account_currency", + "Account Currency", ] writer = UnicodeWriter() writer.writerow(fields) From bbb6a62a7ddbc5337998652721160437f79301eb Mon Sep 17 00:00:00 2001 From: Patrick Eissler <77415730+PatrickDenis-stack@users.noreply.github.com> Date: Mon, 27 Feb 2023 07:19:22 +0100 Subject: [PATCH 3/3] chore: add german translations (#34167) * chore: add german translations * Apply suggestions from code review Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --------- Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- erpnext/translations/de.csv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index 5a0a863a47..bec3ce242b 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -9916,3 +9916,5 @@ Cost and Freight,Kosten und Fracht, Delivered at Place,Geliefert benannter Ort, Delivered at Place Unloaded,Geliefert benannter Ort entladen, Delivered Duty Paid,Geliefert verzollt, +Discount Validity,Frist für den Rabatt, +Discount Validity Based On,Frist für den Rabatt berechnet sich nach,