mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 19:19:17 +00:00
db_update instead of save to avoid unnecessary validations (#13009)
This commit is contained in:
@@ -109,9 +109,9 @@ class LandedCostVoucher(Document):
|
|||||||
# set valuation amount in pr item
|
# set valuation amount in pr item
|
||||||
doc.update_valuation_rate("items")
|
doc.update_valuation_rate("items")
|
||||||
|
|
||||||
# save will update landed_cost_voucher_amount and voucher_amount in PR,
|
# db_update will update and save landed_cost_voucher_amount and voucher_amount in PR
|
||||||
# as those fields are allowed to edit after submit
|
for item in doc.get("items"):
|
||||||
doc.save()
|
item.db_update()
|
||||||
|
|
||||||
# update latest valuation rate in serial no
|
# update latest valuation rate in serial no
|
||||||
self.update_rate_in_serial_no(doc)
|
self.update_rate_in_serial_no(doc)
|
||||||
|
|||||||
Reference in New Issue
Block a user