diff --git a/erpnext/patches.txt b/erpnext/patches.txt index e5cdb1adad..e7c9e7c9a3 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -341,4 +341,5 @@ erpnext.patches.v7_1.add_field_for_task_dependent erpnext.patches.v7_0.repost_bin_qty_and_item_projected_qty erpnext.patches.v7_1.set_prefered_contact_email execute:frappe.db.sql("update `tabSingles` set value = 1 where field = 'unlink_payment_on_cancellation_of_invoice' and doctype = 'Accounts Settings'") -execute:frappe.db.sql("update `tabStock Entry` set total_amount = null where purpose in('Repack', 'Manufacture')") \ No newline at end of file +execute:frappe.db.sql("update `tabStock Entry` set total_amount = null where purpose in('Repack', 'Manufacture')") +erpnext.patches.v7_1.save_stock_settings \ No newline at end of file diff --git a/erpnext/patches/v7_1/save_stock_settings.py b/erpnext/patches/v7_1/save_stock_settings.py new file mode 100644 index 0000000000..a87f6a42a0 --- /dev/null +++ b/erpnext/patches/v7_1/save_stock_settings.py @@ -0,0 +1,6 @@ +from __future__ import unicode_literals +import frappe + +def execute(): + stock_settings = frappe.get_doc('Stock Settings') + stock_settings.save() \ No newline at end of file diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.py b/erpnext/stock/doctype/stock_settings/stock_settings.py index 7c67a652d1..68d64a2474 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/stock_settings.py @@ -10,7 +10,7 @@ from frappe.model.document import Document class StockSettings(Document): def validate(self): - for key in ["item_naming_by", "item_group", "stock_uom", "allow_negative_stock"]: + for key in ["item_naming_by", "item_group", "stock_uom", "allow_negative_stock", "default_warehouse"]: frappe.db.set_default(key, self.get(key, "")) from erpnext.setup.doctype.naming_series.naming_series import set_by_naming_series