fix: correct module for reloading doc ()

This commit is contained in:
Ankush Menat 2021-11-23 18:21:00 +05:30 committed by GitHub
parent 34d1fec7de
commit ab2c1f62a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,10 +6,19 @@ from erpnext.stock.stock_ledger import update_entries_after
def execute(): def execute():
for doctype in ('repost_item_valuation', 'stock_entry_detail', 'purchase_receipt_item', doctypes_to_reload = [
'purchase_invoice_item', 'delivery_note_item', 'sales_invoice_item', 'packed_item'): ("stock", "repost_item_valuation"),
frappe.reload_doc('stock', 'doctype', doctype) ("stock", "stock_entry_detail"),
frappe.reload_doc('buying', 'doctype', 'purchase_receipt_item_supplied') ("stock", "purchase_receipt_item"),
("stock", "delivery_note_item"),
("stock", "packed_item"),
("accounts", "sales_invoice_item"),
("accounts", "purchase_invoice_item"),
("buying", "purchase_receipt_item_supplied")
]
for module, doctype in doctypes_to_reload:
frappe.reload_doc(module, 'doctype', doctype)
reposting_project_deployed_on = get_creation_time() reposting_project_deployed_on = get_creation_time()
posting_date = getdate(reposting_project_deployed_on) posting_date = getdate(reposting_project_deployed_on)