mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
refactor: for non-repost fields, don't validate
This commit is contained in:
@@ -539,6 +539,7 @@ class PurchaseInvoice(BuyingController):
|
||||
]
|
||||
child_tables = {"items": ("expense_account",), "taxes": ("account_head",)}
|
||||
self.needs_repost = self.check_if_fields_updated(fields_to_check, child_tables)
|
||||
if self.needs_repost:
|
||||
self.validate_for_repost()
|
||||
self.db_set("repost_required", self.needs_repost)
|
||||
|
||||
|
||||
@@ -536,6 +536,7 @@ class SalesInvoice(SellingController):
|
||||
"taxes": ("account_head",),
|
||||
}
|
||||
self.needs_repost = self.check_if_fields_updated(fields_to_check, child_tables)
|
||||
if self.needs_repost:
|
||||
self.validate_for_repost()
|
||||
self.db_set("repost_required", self.needs_repost)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user