Fixes in Default Warehouse
This commit is contained in:
parent
75d90b1c00
commit
92a3dbb5d3
@ -12,12 +12,12 @@ frappe.ui.form.on("Production Order", "onload", function(frm) {
|
||||
"actual_start_date": "",
|
||||
"actual_end_date": ""
|
||||
});
|
||||
erpnext.production_order.set_default_warehouse(frm);
|
||||
}
|
||||
|
||||
erpnext.production_order.set_custom_buttons(frm);
|
||||
erpnext.production_order.setup_company_filter(frm);
|
||||
erpnext.production_order.setup_bom_filter(frm);
|
||||
erpnext.production_order.set_default_warehouse(frm);
|
||||
});
|
||||
|
||||
frappe.ui.form.on("Production Order", "refresh", function(frm) {
|
||||
@ -147,8 +147,8 @@ erpnext.production_order = {
|
||||
|
||||
callback: function(r) {
|
||||
if(!r.exe) {
|
||||
frm.set_value("wip_warehouse", r.message[0]);
|
||||
frm.set_value("fg_warehouse", r.message[1])
|
||||
frm.set_value("wip_warehouse", r.message.wip_warehouse);
|
||||
frm.set_value("fg_warehouse", r.message.fg_warehouse)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -427,4 +427,4 @@ def make_time_log(name, operation, from_time=None, to_time=None, qty=None, proj
|
||||
def get_default_warehouse():
|
||||
wip_warehouse = frappe.db.get_single_value("Manufacturing Settings", "default_wip_warehouse")
|
||||
fg_warehouse = frappe.db.get_single_value("Manufacturing Settings", "default_fg_warehouse")
|
||||
return wip_warehouse, fg_warehouse
|
||||
return {"wip_warehouse": wip_warehouse, "fg_warehouse": fg_warehouse}
|
@ -208,9 +208,11 @@ class ProductionPlanningTool(Document):
|
||||
pro.update(items[key])
|
||||
pro.set_production_order_operations()
|
||||
if warehouse:
|
||||
pro.wip_warehouse = warehouse[0]
|
||||
pro.fg_warehouse = warehouse[1]
|
||||
pro.wip_warehouse = warehouse.get('wip_warehouse')
|
||||
if not pro.fg_warehouse:
|
||||
pro.fg_warehouse = warehouse.get('fg_warehouse')
|
||||
frappe.flags.mute_messages = True
|
||||
|
||||
try:
|
||||
pro.insert()
|
||||
pro_list.append(pro.name)
|
||||
@ -218,7 +220,6 @@ class ProductionPlanningTool(Document):
|
||||
pass
|
||||
|
||||
frappe.flags.mute_messages = False
|
||||
|
||||
return pro_list
|
||||
|
||||
def download_raw_materials(self):
|
||||
|
Loading…
Reference in New Issue
Block a user