fix: reload manufacturing setting before patch (#26641) (#26670)

(cherry picked from commit c8d7a8c781f6c448fd872427d611ffab70c136db)

Co-authored-by: Ankush <ankush@iwebnotes.com>
This commit is contained in:
Frappe PR Bot 2021-07-27 16:59:06 +05:30 committed by GitHub
parent f28595cad0
commit b122a1eaa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ def execute():
if not frappe.db.has_column('Work Order', 'has_batch_no'): if not frappe.db.has_column('Work Order', 'has_batch_no'):
return return
frappe.reload_doc('manufacturing', 'doctype', 'manufacturing_settings')
if cint(frappe.db.get_single_value('Manufacturing Settings', 'make_serial_no_batch_from_work_order')): if cint(frappe.db.get_single_value('Manufacturing Settings', 'make_serial_no_batch_from_work_order')):
return return
@ -107,4 +108,4 @@ def repost_future_sle_and_gle(doc):
"company": doc.company "company": doc.company
}) })
create_repost_item_valuation_entry(args) create_repost_item_valuation_entry(args)