From 29160441bbec7841d5381efb3a157d3168808ed1 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Tue, 15 May 2018 14:56:18 +0530 Subject: [PATCH 1/2] [fix] if UOM and Warehouse link is invalid then set blank values --- .../set_qty_in_transactions_based_on_serial_no_input.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/patches/v10_0/set_qty_in_transactions_based_on_serial_no_input.py b/erpnext/patches/v10_0/set_qty_in_transactions_based_on_serial_no_input.py index 5dbcb1d38fa..083b7f4b201 100644 --- a/erpnext/patches/v10_0/set_qty_in_transactions_based_on_serial_no_input.py +++ b/erpnext/patches/v10_0/set_qty_in_transactions_based_on_serial_no_input.py @@ -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() \ No newline at end of file From 78a0be666f370f4a2223afbf06c29dbd513db8aa Mon Sep 17 00:00:00 2001 From: Saurabh Date: Tue, 15 May 2018 15:29:36 +0600 Subject: [PATCH 2/2] bumped to version 10.1.33 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 1df3c7d6916..3eaf994672a 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -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'''