[fix] Default Warehouse not obeying form value (#10153)

This commit is contained in:
Faris Ansari 2017-07-28 20:58:39 +05:30 committed by Nabin Hait
parent 8990af458b
commit 482331b987

View File

@ -132,7 +132,8 @@ class Item(WebsiteGenerator):
from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry
# default warehouse, or Stores # default warehouse, or Stores
default_warehouse = (frappe.db.get_single_value('Stock Settings', 'default_warehouse') default_warehouse = (self.default_warehouse
or frappe.db.get_single_value('Stock Settings', 'default_warehouse')
or frappe.db.get_value('Warehouse', {'warehouse_name': _('Stores')})) or frappe.db.get_value('Warehouse', {'warehouse_name': _('Stores')}))
if default_warehouse: if default_warehouse: