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