Merge branch 'master' into develop

This commit is contained in:
Saurabh 2018-05-15 14:59:38 +05:30
commit ac2692711b
2 changed files with 10 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import frappe
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
__version__ = '10.1.32'
__version__ = '10.1.33'
def get_default_company(user=None):
'''Get default company for user'''

View File

@ -9,4 +9,13 @@ def execute():
ss = frappe.get_doc("Stock Settings")
ss.set_qty_in_transactions_based_on_serial_no_input = 1
if ss.default_warehouse \
and not frappe.db.exists("Warehouse", ss.default_warehouse):
ss.default_warehouse = None
if ss.stock_uom and not frappe.db.exists("UOM", ss.stock_uom):
ss.stock_uom = None
ss.flags.ignore_mandatory = True
ss.save()