Merge pull request #4420 from rmehta/stock-entry-fix
[minor] allow stock entry for manufacture without production order
This commit is contained in:
commit
acaef538c2
@ -171,7 +171,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
},
|
||||
|
||||
toggle_enable_bom: function() {
|
||||
this.frm.toggle_enable("bom_no", !in_list(["Manufacture", "Material Transfer for Manufacture"], this.frm.doc.purpose));
|
||||
this.frm.toggle_enable("bom_no", !!!this.frm.doc.production_order);
|
||||
},
|
||||
|
||||
add_excise_button: function() {
|
||||
|
@ -170,10 +170,8 @@ class StockEntry(StockController):
|
||||
def validate_production_order(self):
|
||||
if self.purpose in ("Manufacture", "Material Transfer for Manufacture"):
|
||||
# check if production order is entered
|
||||
if not self.production_order:
|
||||
frappe.throw(_("Production order number is mandatory for stock entry purpose manufacture"))
|
||||
# check for double entry
|
||||
if self.purpose=="Manufacture":
|
||||
|
||||
if self.purpose=="Manufacture" and self.production_order:
|
||||
if not self.fg_completed_qty:
|
||||
frappe.throw(_("For Quantity (Manufactured Qty) is mandatory"))
|
||||
self.check_if_operations_completed()
|
||||
|
Loading…
x
Reference in New Issue
Block a user