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",
"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))
if not item.transfer_qty and item.qty:

View File

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