bugfix: call set_payment_schedule
only in relevant doc
This commit is contained in:
parent
df3a175974
commit
ecb118fb3b
@ -26,8 +26,9 @@ class AccountsController(TransactionBase):
|
||||
return self.__company_currency
|
||||
|
||||
def onload(self):
|
||||
print("onload called:", self.get("__onload"))
|
||||
self.get("__onload").make_payment_via_journal_entry = frappe.db.get_single_value('Accounts Settings', 'make_payment_via_journal_entry')
|
||||
relevant_docs = ("Quotation", "Purchase Order", "Sales Order", "Purchase Invoice", "Purchase Order")
|
||||
if self.doctype in relevant_docs:
|
||||
self.set_payment_schedule()
|
||||
|
||||
def validate(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user