From 8334a3a1fd1b1ffeb6eaf068e5d1da40af0fb0ff Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Mon, 10 Feb 2020 00:34:09 +0530 Subject: [PATCH] fix: patch for creating irs_1099 custom field (United States) --- erpnext/patches.txt | 1 + .../v12_0/create_irs_1099_field_united_states.py | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 erpnext/patches/v12_0/create_irs_1099_field_united_states.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 047fc85f0a..428bb7f4ee 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -644,3 +644,4 @@ erpnext.patches.v12_0.set_expense_account_in_landed_cost_voucher_taxes erpnext.patches.v12_0.replace_accounting_with_accounts_in_home_settings erpnext.patches.v12_0.set_payment_entry_status erpnext.patches.v12_0.update_owner_fields_in_acc_dimension_custom_fields +erpnext.patches.v12_0.create_irs_1099_field_united_states diff --git a/erpnext/patches/v12_0/create_irs_1099_field_united_states.py b/erpnext/patches/v12_0/create_irs_1099_field_united_states.py new file mode 100644 index 0000000000..3e4c87f434 --- /dev/null +++ b/erpnext/patches/v12_0/create_irs_1099_field_united_states.py @@ -0,0 +1,10 @@ +from __future__ import unicode_literals +import frappe +from erpnext.regional.united_states.setup import make_custom_fields + +def execute(): + company = frappe.get_all('Company', filters = {'country': 'United States'}) + if not company: + return + + make_custom_fields() \ No newline at end of file