mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
Merge branch 'version-13-hotfix' of https://github.com/frappe/erpnext into e-commerce-refactor
This commit is contained in:
@@ -141,6 +141,6 @@ def get_non_stock_item_status(item_code, item_warehouse_field):
|
||||
if frappe.db.exists("Product Bundle", item_code):
|
||||
items = frappe.get_doc("Product Bundle", item_code).get_all_children()
|
||||
bundle_warehouse = frappe.db.get_value('Item', item_code, item_warehouse_field)
|
||||
return all([get_web_item_qty_in_stock(d.item_code, item_warehouse_field, bundle_warehouse).in_stock for d in items])
|
||||
return all(get_web_item_qty_in_stock(d.item_code, item_warehouse_field, bundle_warehouse).in_stock for d in items)
|
||||
else:
|
||||
return 1
|
||||
|
||||
@@ -147,7 +147,7 @@ class TransactionBase(StatusUpdater):
|
||||
if hasattr(self, "prev_link_mapper") and self.prev_link_mapper.get(for_doctype):
|
||||
fieldname = self.prev_link_mapper[for_doctype]["fieldname"]
|
||||
|
||||
values = filter(None, tuple([item.as_dict()[fieldname] for item in self.items]))
|
||||
values = filter(None, tuple(item.as_dict()[fieldname] for item in self.items))
|
||||
|
||||
if values:
|
||||
ret = {
|
||||
@@ -180,7 +180,7 @@ def validate_uom_is_integer(doc, uom_field, qty_fields, child_dt=None):
|
||||
if isinstance(qty_fields, string_types):
|
||||
qty_fields = [qty_fields]
|
||||
|
||||
distinct_uoms = list(set([d.get(uom_field) for d in doc.get_all_children()]))
|
||||
distinct_uoms = list(set(d.get(uom_field) for d in doc.get_all_children()))
|
||||
integer_uoms = list(filter(lambda uom: frappe.db.get_value("UOM", uom,
|
||||
"must_be_whole_number", cache=True) or None, distinct_uoms))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user