fix: Dont set idx while adding WO items to Stock Entry

- `idx` must be computed by base document's `self.append()` function, so do not set it
This commit is contained in:
marination 2022-03-23 14:59:27 +05:30
parent d180d09916
commit a787ebb732

View File

@ -1603,8 +1603,11 @@ class StockEntry(StockController):
se_child.is_scrap_item = item_row.get("is_scrap_item", 0)
se_child.is_process_loss = item_row.get("is_process_loss", 0)
for field in ["idx", "po_detail", "original_item", "expense_account",
"description", "item_name", "serial_no", "batch_no", "allow_zero_valuation_rate"]:
for field in [
"po_detail", "original_item", "expense_account",
"description", "item_name", "serial_no",
"batch_no", "allow_zero_valuation_rate"
]:
if item_row.get(field):
se_child.set(field, item_row.get(field))