fix: Conversion factor fixes in Stock Entry

This commit is contained in:
Deepesh Garg 2020-09-23 12:50:06 +05:30
parent 639542c81d
commit 2bf4245334
2 changed files with 9 additions and 9 deletions

View File

@ -205,7 +205,9 @@ class StockEntry(StockController):
for f in ("uom", "stock_uom", "description", "item_name", "expense_account", for f in ("uom", "stock_uom", "description", "item_name", "expense_account",
"cost_center", "conversion_factor"): "cost_center", "conversion_factor"):
if f in ["stock_uom", "conversion_factor"] or not item.get(f): if f == "stock_uom" or not item.get(f):
item.set(f, item_details.get(f))
if f == 'conversion_factor' and item.uom == item_details.get('stock_uom'):
item.set(f, item_details.get(f)) item.set(f, item_details.get(f))
if not item.transfer_qty and item.qty: if not item.transfer_qty and item.qty:

View File

@ -238,7 +238,6 @@
"oldfieldname": "conversion_factor", "oldfieldname": "conversion_factor",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"print_hide": 1, "print_hide": 1,
"read_only": 1,
"reqd": 1 "reqd": 1
}, },
{ {
@ -498,15 +497,14 @@
"depends_on": "eval:parent.purpose===\"Repack\" && doc.t_warehouse", "depends_on": "eval:parent.purpose===\"Repack\" && doc.t_warehouse",
"fieldname": "set_basic_rate_manually", "fieldname": "set_basic_rate_manually",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Set Basic Rate Manually", "label": "Set Basic Rate Manually"
"show_days": 1,
"show_seconds": 1
} }
], ],
"idx": 1, "idx": 1,
"index_web_pages_for_search": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2020-06-08 12:57:03.172887", "modified": "2020-09-22 17:55:03.384138",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Stock Entry Detail", "name": "Stock Entry Detail",