[hotfix] multicurrency patch

This commit is contained in:
Anand Doshi 2015-09-17 17:28:39 +05:30
parent a8de61e24b
commit c439b87ccc

View File

@ -69,6 +69,7 @@ def execute():
parties = frappe.get_all(dt)
for p in parties:
party = frappe.get_doc(dt, p.name)
party_accounts = []
for company in company_list:
# Get party GL Entries
@ -83,7 +84,6 @@ def execute():
# Add default receivable /payable account if not exists
# and currency is other than company currency
party_accounts = []
if party.party_account_currency and party.party_account_currency != company.default_currency:
party_account_exists_for_company = False
for d in party.get("accounts"):
@ -112,6 +112,7 @@ def execute():
"company": company.name,
"account": party_account
})
party.set("accounts", party_accounts)
party.flags.ignore_mandatory = True
party.save()