db_update instead of save to avoid unnecessary validations (#13009)
This commit is contained in:
parent
2fbb4923a7
commit
f65afac353
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user