fix: use list() on self mutating iteration
https://github.com/frappe/erpnext/issues/30325 Signed-off-by: Sabu Siyad <hello@ssiyad.com>
This commit is contained in:
parent
fd3c7903ba
commit
546c809cbe
@ -302,7 +302,7 @@ def check_for_nexus(doc, tax_dict):
|
|||||||
item.tax_collectable = flt(0)
|
item.tax_collectable = flt(0)
|
||||||
item.taxable_amount = flt(0)
|
item.taxable_amount = flt(0)
|
||||||
|
|
||||||
for tax in doc.taxes:
|
for tax in list(doc.taxes):
|
||||||
if tax.account_head == TAX_ACCOUNT_HEAD:
|
if tax.account_head == TAX_ACCOUNT_HEAD:
|
||||||
doc.taxes.remove(tax)
|
doc.taxes.remove(tax)
|
||||||
return
|
return
|
||||||
|
|||||||
@ -394,7 +394,7 @@ def get_opening_balance(filters, columns, sl_entries):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# check if any SLEs are actually Opening Stock Reconciliation
|
# check if any SLEs are actually Opening Stock Reconciliation
|
||||||
for sle in sl_entries:
|
for sle in list(sl_entries):
|
||||||
if (
|
if (
|
||||||
sle.get("voucher_type") == "Stock Reconciliation"
|
sle.get("voucher_type") == "Stock Reconciliation"
|
||||||
and sle.posting_date == filters.from_date
|
and sle.posting_date == filters.from_date
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user