diff --git a/accounts/doctype/receivable_voucher/receivable_voucher.py b/accounts/doctype/receivable_voucher/receivable_voucher.py index 267ea9212f2..f26374a3826 100644 --- a/accounts/doctype/receivable_voucher/receivable_voucher.py +++ b/accounts/doctype/receivable_voucher/receivable_voucher.py @@ -580,6 +580,7 @@ class DocType(TransactionBase): # Get Warehouse def get_warehouse(self): w = sql("select warehouse from `tabPOS Setting` where ifnull(user,'') = '%s' and company = '%s'" % (session['user'], self.doc.company)) + w = w and w[0][0] or '' if not w: ps = sql("select name, warehouse from `tabPOS Setting` where ifnull(user,'') = '' and company = '%s'" % self.doc.company) if not ps: diff --git a/patches/patch.py b/patches/patch.py index cf9774bffe0..e815865e84a 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -251,6 +251,8 @@ def execute(patch_no): reload_doc('stock','doctype','item_customer_detail') elif patch_no == 344: sql("delete from `tabDocFormat` where ifnull(format, '') = '' and parent = 'Delivery Note'") + reload_doc('stock', 'doctype', 'delivery_note_detail') + reload_doc('stock', 'doctype', 'item_customer_detail') elif patch_no == 345: # rerun 343 (merge confict) reload_doc('stock','doctype','item_customer_detail')