mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-30 15:09:47 +00:00
Merge pull request #26420 from deepeshgarg007/new_company_error
fix: Errors on parallel requests creation of company for India
This commit is contained in:
@@ -291,7 +291,7 @@ class Company(NestedSet):
|
||||
cash = frappe.db.get_value('Mode of Payment', {'type': 'Cash'}, 'name')
|
||||
if cash and self.default_cash_account \
|
||||
and not frappe.db.get_value('Mode of Payment Account', {'company': self.name, 'parent': cash}):
|
||||
mode_of_payment = frappe.get_doc('Mode of Payment', cash)
|
||||
mode_of_payment = frappe.get_doc('Mode of Payment', cash, for_update=True)
|
||||
mode_of_payment.append('accounts', {
|
||||
'company': self.name,
|
||||
'default_account': self.default_cash_account
|
||||
|
||||
Reference in New Issue
Block a user