[fixes] reviwe fixes

This commit is contained in:
Saurabh
2015-10-21 19:28:53 +05:30
parent edba048c14
commit 8a8ef85174
13 changed files with 116 additions and 174 deletions

View File

@@ -223,10 +223,8 @@ class SellingController(StockController):
for d in self.get("items"):
if d.get(ref_fieldname):
status = frappe.db.get_value("Sales Order", d.get(ref_fieldname), "status")
if status == "Stopped":
frappe.throw(_("Sales Order {0} is stopped").format(d.get(ref_fieldname)))
if status == "Closed":
frappe.throw(_("Sales Order {0} is closed").format(d.get(ref_fieldname)))
if status in ("Stopped", "Closed"):
frappe.throw(_("Sales Order {0} is {1}").format(d.get(ref_fieldname), status))
def check_active_sales_items(obj):
for d in obj.get("items"):