fix: copy correct uom from devliery note when creating packing list

This commit is contained in:
Mihir Kandoi
2025-02-03 14:49:50 +05:30
parent 4b345cf495
commit 3cdaa80526
2 changed files with 3 additions and 4 deletions

View File

@@ -1127,7 +1127,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: