[minor] stopped or cancelled message

This commit is contained in:
Anand Doshi 2015-08-26 19:14:16 +05:30
parent 10fc83d369
commit fa65c7bf29
3 changed files with 12 additions and 9 deletions

View File

@ -242,7 +242,8 @@ class StockController(AccountsController):
sales_order = frappe.get_doc("Sales Order", so)
if sales_order.status in ["Stopped", "Cancelled"]:
frappe.throw(_("Sales Order {0} is cancelled or stopped").format(so), frappe.InvalidStatusError)
frappe.throw(_("{0} {1} is cancelled or stopped").format(_("Sales Order"), so),
frappe.InvalidStatusError)
sales_order.update_reserved_qty(so_item_rows)

View File

@ -162,7 +162,8 @@ def update_completed_and_requested_qty(stock_entry, method):
mr_obj = frappe.get_doc("Material Request", mr)
if mr_obj.status in ["Stopped", "Cancelled"]:
frappe.throw(_("Material Request {0} is cancelled or stopped").format(mr), frappe.InvalidStatusError)
frappe.throw(_("{0} {1} is cancelled or stopped").format(_("Material Request"), mr),
frappe.InvalidStatusError)
mr_obj.update_completed_qty(mr_item_rows)
mr_obj.update_requested_qty(mr_item_rows)

View File

@ -183,7 +183,8 @@ class PurchaseReceipt(BuyingController):
po_obj = frappe.get_doc("Purchase Order", po)
if po_obj.status in ["Stopped", "Cancelled"]:
frappe.throw(_("Material Request {0} is cancelled or stopped").format(po), frappe.InvalidStatusError)
frappe.throw(_("{0} {1} is cancelled or stopped").format(_("Purchase Order"), po),
frappe.InvalidStatusError)
po_obj.update_ordered_qty(po_item_rows)