fix: landed cost voucher for legacy pr with batch

This commit is contained in:
Rohit Waghchaure
2024-04-11 16:20:55 +05:30
parent fc835ed6b1
commit fa91cda46c
3 changed files with 152 additions and 2 deletions

View File

@@ -166,7 +166,7 @@ class StockController(AccountsController):
# remove extra whitespace and store one serial no on each line
row.serial_no = clean_serial_no_string(row.serial_no)
def make_bundle_using_old_serial_batch_fields(self, table_name=None):
def make_bundle_using_old_serial_batch_fields(self, table_name=None, via_landed_cost_voucher=False):
if self.get("_action") == "update_after_submit":
return
@@ -205,7 +205,7 @@ class StockController(AccountsController):
"company": self.company,
"is_rejected": 1 if row.get("rejected_warehouse") else 0,
"use_serial_batch_fields": row.use_serial_batch_fields,
"do_not_submit": True,
"do_not_submit": True if not via_landed_cost_voucher else False,
}
if row.get("qty") or row.get("consumed_qty"):