db_update instead of save to avoid unnecessary validations (#13009)

This commit is contained in:
Shreya Shah 2018-02-21 11:12:04 +05:30 committed by Nabin Hait
parent 2fbb4923a7
commit f65afac353

View File

@ -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)