fix: serial and batch bundle return not working (backport #38754) (#38806)

fix: serial and batch bundle return not working (#38754)

* fix: serial and batch bundle return not working

* test: added test case for delivery note return against denormalized serial no

(cherry picked from commit 0743289925)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2023-12-17 18:02:31 +05:30
committed by GitHub
parent 18bd330a59
commit 8990c48e7b
12 changed files with 460 additions and 133 deletions

View File

@@ -455,6 +455,12 @@ class StockController(AccountsController):
sl_dict.update(args)
self.update_inventory_dimensions(d, sl_dict)
if self.docstatus == 2:
# To handle denormalized serial no records, will br deprecated in v16
for field in ["serial_no", "batch_no"]:
if d.get(field):
sl_dict[field] = d.get(field)
return sl_dict
def update_inventory_dimensions(self, row, sl_dict) -> None: