From acc4ceceb7ee794f5d7255e1531332a5b11c77a9 Mon Sep 17 00:00:00 2001 From: Shreya Date: Tue, 15 May 2018 17:50:52 +0530 Subject: [PATCH] Add Patch to update existing records --- erpnext/patches.txt | 1 + .../v11_0/check_buying_selling_in_currency_exchange.py | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index cdea9e7d90..fa2251f042 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -537,3 +537,4 @@ erpnext.patches.v11_0.rename_supplier_type_to_supplier_group erpnext.patches.v11_0.create_department_records_for_each_company erpnext.patches.v11_0.make_location_from_warehouse erpnext.patches.v11_0.make_asset_finance_book_against_old_entries +erpnext.patches.v11_0.check_buying_selling_in_currency_exchange diff --git a/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py b/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py new file mode 100644 index 0000000000..ee336be3b5 --- /dev/null +++ b/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py @@ -0,0 +1,5 @@ +import frappe + +def execute(): + frappe.reload_doc('setup', 'doctype', 'currency_exchange') + frappe.db.sql("""update `tabCurrency Exchange` set for_buying = 1, for_selling = 1""") \ No newline at end of file