Skip to content

Commit

Permalink
Removed problem for creating multiple production orders from Bulk PRO
Browse files Browse the repository at this point in the history
  • Loading branch information
adityaduggal committed Oct 5, 2019
1 parent 3f6b5d4 commit 21b76e7
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def raise_production_orders(self):
pro_list.append(production_order)

#frappe.flags.mute_messages = False
i = 0
for row in self.get("items"):
row.work_order = pro_list[i]
i += 1

if pro_list:
pro_list = ["""<a href="#Form/Work Order/%s" target="_blank">%s</a>""" % \
Expand Down Expand Up @@ -196,4 +200,6 @@ def create_production_order(self, item_dict):
def validate_data(self):
for d in self.get('items'):
if not flt(d.planned_qty):
frappe.throw(_("Please enter Planned Qty for Item {0} at row {1}").format(d.item_code, d.idx))
frappe.throw(_("Please enter Planned Qty for Item {0} at row {1}").format(d.item_code, d.idx))
if d.work_order:
frappe.throw(_("Work Order # {} already created for Row# {}").format(d.work_order, d.idx))

0 comments on commit 21b76e7

Please sign in to comment.