From 1343a4b7557266b2d8ec4d2b3b3c0498deb38ff5 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Mon, 10 Feb 2020 00:31:44 +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 17c9a20766d..9fde54225ac 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -648,3 +648,4 @@ erpnext.patches.v12_0.update_owner_fields_in_acc_dimension_custom_fields erpnext.patches.v12_0.remove_denied_leaves_from_leave_ledger erpnext.patches.v12_0.update_price_or_product_discount erpnext.patches.v12_0.add_export_type_field_in_party_master +erpnext.patches.v12_0.create_irs_1099_field_united_states \ No newline at end of file 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 00000000000..3e4c87f434e --- /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