[fixes] filter on supplier list for DropShip, checking closed status

This commit is contained in:
Saurabh
2015-10-20 13:34:21 +05:30
parent 99543f72d8
commit e930f0f74e
5 changed files with 47 additions and 9 deletions

View File

@@ -219,12 +219,14 @@ class SellingController(StockController):
so_warehouse = so_item and so_item[0]["warehouse"] or ""
return so_qty, so_warehouse
def check_stop_sales_order(self, ref_fieldname):
def check_stop_or_close_sales_order(self, ref_fieldname):
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)))
def check_active_sales_items(obj):
for d in obj.get("items"):