diff --git a/erpnext/manufacturing/doctype/blanket_order/blanket_order.js b/erpnext/manufacturing/doctype/blanket_order/blanket_order.js index 8f0a5e0133..b6ad27632e 100644 --- a/erpnext/manufacturing/doctype/blanket_order/blanket_order.js +++ b/erpnext/manufacturing/doctype/blanket_order/blanket_order.js @@ -53,6 +53,7 @@ frappe.ui.form.on('Blanket Order', { if (frm.doc.blanket_order_type === 'Selling') { frm.set_df_property("customer","reqd", 1) frm.set_df_property("supplier","reqd", 0) + frm.set_value("supplier", "") frm.set_query("tc_name", function() { return { filters: { selling: 1 } }; @@ -61,6 +62,8 @@ frappe.ui.form.on('Blanket Order', { if (frm.doc.blanket_order_type === 'Purchasing') { frm.set_df_property("supplier","reqd", 1) frm.set_df_property("customer","reqd", 0) + frm.set_value("customer", "") + frm.set_query("tc_name", function() { return { filters: { buying: 1 } }; diff --git a/erpnext/manufacturing/doctype/blanket_order/blanket_order.json b/erpnext/manufacturing/doctype/blanket_order/blanket_order.json index 570d435c5f..260e0b8a73 100644 --- a/erpnext/manufacturing/doctype/blanket_order/blanket_order.json +++ b/erpnext/manufacturing/doctype/blanket_order/blanket_order.json @@ -88,7 +88,8 @@ "fieldname": "company", "fieldtype": "Link", "label": "Company", - "options": "Company" + "options": "Company", + "reqd": 1 }, { "fieldname": "section_break_12", @@ -128,7 +129,7 @@ } ], "is_submittable": 1, - "modified": "2019-06-19 11:59:09.279607", + "modified": "2019-10-16 13:38:32.302316", "modified_by": "Administrator", "module": "Manufacturing", "name": "Blanket Order",