fix: Reset weight_per_unit on replacing Item (#26619) (#26791)

* fix: Assign Item's default weight_per_unit as its weight_per_unit in get_item_details

* fix: Set weight_uom in get_item_details as Item's default weight_uom

(cherry picked from commit 471f48f64d)

Co-authored-by: Ganga Manoj <ganga.manoj98@gmail.com>
This commit is contained in:
Frappe PR Bot
2021-08-03 20:06:07 +05:30
committed by GitHub
parent 5a442f1bce
commit 85815f989c

View File

@@ -312,8 +312,8 @@ def get_basic_details(args, item, overwrite_warehouse=True):
"transaction_date": args.get("transaction_date"),
"against_blanket_order": args.get("against_blanket_order"),
"bom_no": item.get("default_bom"),
"weight_per_unit": args.get("weight_per_unit") or item.get("weight_per_unit"),
"weight_uom": args.get("weight_uom") or item.get("weight_uom")
"weight_per_unit": item.get("weight_per_unit"),
"weight_uom": item.get("weight_uom")
})
if item.get("enable_deferred_revenue") or item.get("enable_deferred_expense"):