fix: correct module for reloading doc (#28523)

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():
for doctype in ('repost_item_valuation', 'stock_entry_detail', 'purchase_receipt_item',
'purchase_invoice_item', 'delivery_note_item', 'sales_invoice_item', 'packed_item'):
frappe.reload_doc('stock', 'doctype', doctype)
frappe.reload_doc('buying', 'doctype', 'purchase_receipt_item_supplied')
doctypes_to_reload = [
("stock", "repost_item_valuation"),
("stock", "stock_entry_detail"),
("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()
posting_date = getdate(reposting_project_deployed_on)