fix: task optimisation and test case fixes

This commit is contained in:
Nabin Hait
2019-04-12 11:24:32 +05:30
parent b42bbf1b6f
commit ea4c2c9e7d
9 changed files with 33 additions and 23 deletions

View File

@@ -30,8 +30,9 @@ class AccountsController(TransactionBase):
return self.__company_currency
def onload(self):
self.get("__onload").make_payment_via_journal_entry \
= frappe.db.get_single_value('Accounts Settings', 'make_payment_via_journal_entry')
if self.get("__onload"):
self.get("__onload").make_payment_via_journal_entry \
= frappe.db.get_single_value('Accounts Settings', 'make_payment_via_journal_entry')
if self.is_new():
relevant_docs = ("Quotation", "Purchase Order", "Sales Order",