Merge pull request #45719 from frappe/mergify/bp/version-15-hotfix/pr-45678

fix: copy correct uom from delivery note when creating packing list (backport #45678)
This commit is contained in:
ruthra kumar
2025-02-05 10:38:13 +05:30
committed by GitHub
2 changed files with 3 additions and 4 deletions

View File

@@ -1132,7 +1132,7 @@ def make_packing_slip(source_name, target_doc=None):
"batch_no": "batch_no",
"description": "description",
"qty": "qty",
"stock_uom": "stock_uom",
"uom": "stock_uom",
"name": "dn_detail",
},
"postprocess": update_item,

View File

@@ -159,11 +159,10 @@ class PackingSlip(StatusUpdater):
self.from_case_no = self.get_recommended_case_no()
for item in self.items:
stock_uom, weight_per_unit, weight_uom = frappe.db.get_value(
"Item", item.item_code, ["stock_uom", "weight_per_unit", "weight_uom"]
weight_per_unit, weight_uom = frappe.db.get_value(
"Item", item.item_code, ["weight_per_unit", "weight_uom"]
)
item.stock_uom = stock_uom
if weight_per_unit and not item.net_weight:
item.net_weight = weight_per_unit
if weight_uom and not item.weight_uom: