Merge pull request #2646 from nabinhait/fix1
Minor fixes
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 604ac11..5b0f7e9 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -51,12 +51,12 @@
frappe.throw(_("Reserved warehouse required for stock item {0}").format(d.item_code))
if e in check_list:
- frappe.throw(_("Item {0} has been entered twice").format(d.item_code))
+ frappe.msgprint(_("Item {0} has been entered twice").format(d.item_code))
else:
check_list.append(e)
else:
if f in chk_dupl_itm:
- frappe.throw(_("Item {0} has been entered twice").format(d.item_code))
+ frappe.msgprint(_("Item {0} has been entered twice").format(d.item_code))
else:
chk_dupl_itm.append(f)
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 96dee3d..a2c670e 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -231,8 +231,8 @@
if(!row.t_warehouse) row.t_warehouse = this.frm.doc.to_warehouse;
},
- source_mandatory: ["Material Issue", "Material Transfer", "Purchase Return"],
- target_mandatory: ["Material Receipt", "Material Transfer", "Sales Return"],
+ source_mandatory: ["Material Issue", "Material Transfer", "Purchase Return", "Subcontract"],
+ target_mandatory: ["Material Receipt", "Material Transfer", "Sales Return", "Subcontract"],
from_warehouse: function(doc) {
var me = this;
@@ -462,4 +462,4 @@
return { query: "erpnext.controllers.queries.supplier_query" }
}
cur_frm.add_fetch('production_order', 'total_fixed_cost', 'total_fixed_cost');
-cur_frm.add_fetch('bom_no', 'total_fixed_cost', 'total_fixed_cost');
\ No newline at end of file
+cur_frm.add_fetch('bom_no', 'total_fixed_cost', 'total_fixed_cost');
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.py b/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
index e16017d..11ecd29 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
@@ -27,6 +27,7 @@
mntc_date = self.mntc_date
service_person = d.service_person
work_done = d.work_done
+ status = "Open"
if self.completion_status == 'Fully Completed':
status = 'Closed'
elif self.completion_status == 'Partially Completed':