fix: Reset weight_per_unit on replacing Item (#26619)

* 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
This commit is contained in:
Ganga Manoj 2021-08-03 14:39:38 +05:30 committed by GitHub
parent efb037b566
commit 471f48f64d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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"):