Default warehouse in Item master

This commit is contained in:
Kanchan Chauhan 2016-10-27 23:56:04 +05:30
parent 0bb92ab7a0
commit 4c22825f01
3 changed files with 9 additions and 2 deletions

View File

@ -342,3 +342,4 @@ 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')")
erpnext.patches.v7_1.save_stock_settings

View File

@ -0,0 +1,6 @@
from __future__ import unicode_literals
import frappe
def execute():
stock_settings = frappe.get_doc('Stock Settings')
stock_settings.save()

View File

@ -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