Update material_request.py

This commit is contained in:
Nabin Hait 2017-03-09 10:57:00 +05:30 committed by GitHub
parent 02fb5880fe
commit f73a44aa8d

View File

@ -393,11 +393,11 @@ def raise_production_orders(material_request):
prod_order.save()
production_orders.append(prod_order.name)
else:
errors.append("Bom not found for Item " + d.item_code + " in Row " + cstr(d.idx))
errors.append(_("Row {0}: Bill of Materials not found for the Item {1}").format(d.idx, d.item_code))
if production_orders:
message = ["""<a href="#Form/Production Order/%s" target="_blank">%s</a>""" % \
(p, p) for p in production_orders]
msgprint(_("The following Production Orders were created:" + '\n' + new_line_sep(message)))
msgprint(_("The following Production Orders were created:") + '\n' + new_line_sep(message))
if errors:
frappe.throw(_("Productions Orders cannot be raised for:" + '\n' + new_line_sep(errors)))
frappe.throw(_("Productions Orders cannot be raised for:") + '\n' + new_line_sep(errors))
return production_orders