fix(patch): fix failing patches (#30427)

* patch: reload Opportunity

* patch: reload child tables before doctype
This commit is contained in:
Raffael Meyer
2022-03-28 14:23:54 +02:00
committed by GitHub
parent eea183957a
commit c01fe74cf0
2 changed files with 3 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ from erpnext.setup.install import setup_currency_exchange
def execute():
frappe.reload_doc("accounts", "doctype", "currency_exchange_settings")
frappe.reload_doc("accounts", "doctype", "currency_exchange_settings_result")
frappe.reload_doc("accounts", "doctype", "currency_exchange_settings_details")
frappe.reload_doc("accounts", "doctype", "currency_exchange_settings")
setup_currency_exchange()

View File

@@ -6,6 +6,7 @@ from erpnext.setup.utils import get_exchange_rate
def execute():
frappe.reload_doctype("Opportunity")
opportunities = frappe.db.get_list('Opportunity', filters={
'opportunity_amount': ['>', 0]
}, fields=['name', 'company', 'currency', 'opportunity_amount'])