fix: update idx after updating items in so/po (#29134)

This commit is contained in:
Ankush Menat 2022-01-04 18:39:30 +05:30 committed by GitHub
parent 0900c3d655
commit 733c9defdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2119,6 +2119,11 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
parent.update_status_updater()
else:
parent.check_credit_limit()
# reset index of child table
for idx, row in enumerate(parent.get(child_docname), start=1):
row.idx = idx
parent.save()
if parent_doctype == 'Purchase Order':