Merge pull request #18719 from Anurag810/company_fix_v13

fix: removed hard coded string
This commit is contained in:
Deepesh Garg 2019-08-14 12:12:26 +05:30 committed by GitHub
commit 612b0ff9cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -252,7 +252,7 @@ class Company(NestedSet):
def set_mode_of_payment_account(self):
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'}):
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.append('accounts', {
'company': self.name,