From 37799fe3dd5beed8b05ab0ea83139f3e5f200179 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 3 Nov 2021 16:33:28 +0530 Subject: [PATCH 01/10] fix: use completion qty instead of transfer quantity for JC status --- erpnext/manufacturing/doctype/job_card/job_card.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index f0f18cf7dd..5eea032be5 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -504,13 +504,11 @@ class JobCard(Document): self.status = 'Work In Progress' if (self.docstatus == 1 and - (self.for_quantity <= self.transferred_qty or not self.items)): - # consider excess transfer - # completed qty is checked via separate validation + (self.for_quantity <= self.total_completed_qty or not self.items)): self.status = 'Completed' if self.status != 'Completed': - if self.for_quantity == self.transferred_qty: + if self.for_quantity <= self.transferred_qty: self.status = 'Material Transferred' if update_status: From fdfa39c231ed3648d6e8b7cf0cda1934062b49da Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 3 Nov 2021 12:48:57 +0530 Subject: [PATCH 02/10] fix: avoid mutating iterator while iterating over it --- erpnext/stock/doctype/stock_entry/stock_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index fa2436bd27..46c9576a9c 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1450,7 +1450,7 @@ class StockEntry(StockController): item_dict[item]["qty"] = 0 # delete items with 0 qty - list_of_items = item_dict.keys() + list_of_items = list(item_dict.keys()) for item in list_of_items: if not item_dict[item]["qty"]: del item_dict[item] From ccf84ae88a752d94d459e369fa5c1afaab9e49f1 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sun, 7 Nov 2021 18:06:37 +0530 Subject: [PATCH 03/10] fix: patch to update job card status --- erpnext/patches.txt | 1 + .../patches/v13_0/update_job_card_status.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 erpnext/patches/v13_0/update_job_card_status.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 1006e2180f..778cbdf65b 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -303,6 +303,7 @@ erpnext.patches.v13_0.set_status_in_maintenance_schedule_table erpnext.patches.v13_0.add_default_interview_notification_templates erpnext.patches.v13_0.enable_scheduler_job_for_item_reposting erpnext.patches.v13_0.requeue_failed_reposts +erpnext.patches.v13_0.update_job_card_status erpnext.patches.v12_0.update_production_plan_status erpnext.patches.v13_0.healthcare_deprecation_warning erpnext.patches.v14_0.delete_healthcare_doctypes diff --git a/erpnext/patches/v13_0/update_job_card_status.py b/erpnext/patches/v13_0/update_job_card_status.py new file mode 100644 index 0000000000..797a3e2ae3 --- /dev/null +++ b/erpnext/patches/v13_0/update_job_card_status.py @@ -0,0 +1,18 @@ +# Copyright (c) 2021, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + +import frappe + + +def execute(): + + job_card = frappe.qb.DocType("Job Card") + (frappe.qb + .update(job_card) + .set(job_card.status, "Completed") + .where( + (job_card.docstatus == 1) + & (job_card.for_quantity <= job_card.total_completed_qty) + & (job_card.status.isin(["Work In Progress", "Material Transferred"])) + ) + ).run() From 6954dd6329f2af0db88413fe933c5e1a111bcb9b Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Tue, 9 Nov 2021 19:36:27 +0530 Subject: [PATCH 04/10] feat: Competitor Tagging in Opportunity and Quotation (#28050) * feat: Competitor Tagging in Opportunity and Quotation * fix: review changes * fix: linter issue * fix: section label Co-authored-by: Rucha Mahabal --- erpnext/crm/doctype/competitor/__init__.py | 0 erpnext/crm/doctype/competitor/competitor.js | 8 +++ .../crm/doctype/competitor/competitor.json | 68 +++++++++++++++++++ erpnext/crm/doctype/competitor/competitor.py | 9 +++ .../crm/doctype/competitor/test_competitor.py | 9 +++ .../crm/doctype/competitor_detail/__init__.py | 0 .../competitor_detail/competitor_detail.json | 33 +++++++++ .../competitor_detail/competitor_detail.py | 9 +++ .../crm/doctype/opportunity/opportunity.json | 31 +++++++-- .../crm/doctype/opportunity/opportunity.py | 10 ++- .../selling/doctype/quotation/quotation.json | 15 +++- .../selling/doctype/quotation/quotation.py | 5 +- erpnext/selling/sales_common.js | 18 +++-- 13 files changed, 197 insertions(+), 18 deletions(-) create mode 100644 erpnext/crm/doctype/competitor/__init__.py create mode 100644 erpnext/crm/doctype/competitor/competitor.js create mode 100644 erpnext/crm/doctype/competitor/competitor.json create mode 100644 erpnext/crm/doctype/competitor/competitor.py create mode 100644 erpnext/crm/doctype/competitor/test_competitor.py create mode 100644 erpnext/crm/doctype/competitor_detail/__init__.py create mode 100644 erpnext/crm/doctype/competitor_detail/competitor_detail.json create mode 100644 erpnext/crm/doctype/competitor_detail/competitor_detail.py diff --git a/erpnext/crm/doctype/competitor/__init__.py b/erpnext/crm/doctype/competitor/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/crm/doctype/competitor/competitor.js b/erpnext/crm/doctype/competitor/competitor.js new file mode 100644 index 0000000000..a5b617dc74 --- /dev/null +++ b/erpnext/crm/doctype/competitor/competitor.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Competitor', { + // refresh: function(frm) { + + // } +}); diff --git a/erpnext/crm/doctype/competitor/competitor.json b/erpnext/crm/doctype/competitor/competitor.json new file mode 100644 index 0000000000..280441f16f --- /dev/null +++ b/erpnext/crm/doctype/competitor/competitor.json @@ -0,0 +1,68 @@ +{ + "actions": [], + "allow_rename": 1, + "autoname": "field:competitor_name", + "creation": "2021-10-21 10:28:52.071316", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "competitor_name", + "website" + ], + "fields": [ + { + "fieldname": "competitor_name", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Competitor Name", + "reqd": 1, + "unique": 1 + }, + { + "allow_in_quick_entry": 1, + "fieldname": "website", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Website", + "options": "URL" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2021-10-21 12:43:59.106807", + "modified_by": "Administrator", + "module": "CRM", + "name": "Competitor", + "naming_rule": "By fieldname", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Sales User", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/erpnext/crm/doctype/competitor/competitor.py b/erpnext/crm/doctype/competitor/competitor.py new file mode 100644 index 0000000000..a292e46104 --- /dev/null +++ b/erpnext/crm/doctype/competitor/competitor.py @@ -0,0 +1,9 @@ +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class Competitor(Document): + pass diff --git a/erpnext/crm/doctype/competitor/test_competitor.py b/erpnext/crm/doctype/competitor/test_competitor.py new file mode 100644 index 0000000000..f77d7e658d --- /dev/null +++ b/erpnext/crm/doctype/competitor/test_competitor.py @@ -0,0 +1,9 @@ +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +# import frappe +import unittest + + +class TestCompetitor(unittest.TestCase): + pass diff --git a/erpnext/crm/doctype/competitor_detail/__init__.py b/erpnext/crm/doctype/competitor_detail/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/crm/doctype/competitor_detail/competitor_detail.json b/erpnext/crm/doctype/competitor_detail/competitor_detail.json new file mode 100644 index 0000000000..9512b22a3f --- /dev/null +++ b/erpnext/crm/doctype/competitor_detail/competitor_detail.json @@ -0,0 +1,33 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2021-10-21 10:34:58.841689", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "competitor" + ], + "fields": [ + { + "fieldname": "competitor", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Competitor", + "options": "Competitor", + "reqd": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2021-10-21 10:34:58.841689", + "modified_by": "Administrator", + "module": "CRM", + "name": "Competitor Detail", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/erpnext/crm/doctype/competitor_detail/competitor_detail.py b/erpnext/crm/doctype/competitor_detail/competitor_detail.py new file mode 100644 index 0000000000..0ef75605b7 --- /dev/null +++ b/erpnext/crm/doctype/competitor_detail/competitor_detail.py @@ -0,0 +1,9 @@ +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class CompetitorDetail(Document): + pass diff --git a/erpnext/crm/doctype/opportunity/opportunity.json b/erpnext/crm/doctype/opportunity/opportunity.json index dc886b51b4..feb6044d64 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.json +++ b/erpnext/crm/doctype/opportunity/opportunity.json @@ -23,7 +23,6 @@ "status", "converted_by", "sales_stage", - "order_lost_reason", "first_response_time", "expected_closing", "next_contact", @@ -64,7 +63,11 @@ "transaction_date", "language", "amended_from", - "lost_reasons" + "lost_detail_section", + "lost_reasons", + "order_lost_reason", + "column_break_56", + "competitors" ], "fields": [ { @@ -154,10 +157,9 @@ "reqd": 1 }, { - "depends_on": "eval:doc.status===\"Lost\"", "fieldname": "order_lost_reason", "fieldtype": "Small Text", - "label": "Lost Reason", + "label": "Detailed Reason", "no_copy": 1, "read_only": 1 }, @@ -409,6 +411,7 @@ "width": "150px" }, { + "depends_on": "eval:doc.status===\"Lost\"", "fieldname": "lost_reasons", "fieldtype": "Table MultiSelect", "label": "Lost Reasons", @@ -486,15 +489,33 @@ "label": "Grand Total", "options": "currency", "read_only": 1 + }, + { + "fieldname": "lost_detail_section", + "fieldtype": "Section Break", + "label": "Lost Reasons" + }, + { + "fieldname": "column_break_56", + "fieldtype": "Column Break" + }, + { + "fieldname": "competitors", + "fieldtype": "Table MultiSelect", + "label": "Competitors", + "options": "Competitor Detail", + "read_only": 1 } ], "icon": "fa fa-info-sign", "idx": 195, "links": [], - "modified": "2021-09-06 10:02:18.609136", + "migration_hash": "d87c646ea2579b6900197fd41e6c5c5a", + "modified": "2021-10-21 11:04:30.151379", "modified_by": "Administrator", "module": "CRM", "name": "Opportunity", + "naming_rule": "By \"Naming Series\" field", "owner": "Administrator", "permissions": [ { diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 90eae8dcb9..0bef80a749 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -116,16 +116,20 @@ class Opportunity(TransactionBase): self.party_name = lead_name @frappe.whitelist() - def declare_enquiry_lost(self, lost_reasons_list, detailed_reason=None): + def declare_enquiry_lost(self, lost_reasons_list, competitors, detailed_reason=None): if not self.has_active_quotation(): - frappe.db.set(self, 'status', 'Lost') + self.status = 'Lost' + self.lost_reasons = self.competitors = [] if detailed_reason: - frappe.db.set(self, 'order_lost_reason', detailed_reason) + self.order_lost_reason = detailed_reason for reason in lost_reasons_list: self.append('lost_reasons', reason) + for competitor in competitors: + self.append('competitors', competitor) + self.save() else: diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index 43a44900fc..ad788e5c8b 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -110,7 +110,8 @@ "enq_det", "supplier_quotation", "opportunity", - "lost_reasons" + "lost_reasons", + "competitors" ], "fields": [ { @@ -946,6 +947,14 @@ "label": "Bundle Items", "options": "fa fa-suitcase", "print_hide": 1 + }, + { + "allow_on_submit": 1, + "fieldname": "competitors", + "fieldtype": "Table MultiSelect", + "label": "Competitors", + "options": "Competitor Detail", + "read_only": 1 } ], "icon": "fa fa-shopping-cart", @@ -953,10 +962,12 @@ "is_submittable": 1, "links": [], "max_attachments": 1, - "modified": "2021-08-27 20:10:07.864951", + "migration_hash": "75a86a19f062c2257bcbc8e6e31c7f1e", + "modified": "2021-10-21 12:58:55.514512", "modified_by": "Administrator", "module": "Selling", "name": "Quotation", + "naming_rule": "By \"Naming Series\" field", "owner": "Administrator", "permissions": [ { diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 31b62d6da5..c4752aebb5 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -68,7 +68,7 @@ class Quotation(SellingController): opp.set_status(status=status, update=True) @frappe.whitelist() - def declare_enquiry_lost(self, lost_reasons_list, detailed_reason=None): + def declare_enquiry_lost(self, lost_reasons_list, competitors, detailed_reason=None): if not self.has_sales_order(): get_lost_reasons = frappe.get_list('Quotation Lost Reason', fields = ["name"]) @@ -84,6 +84,9 @@ class Quotation(SellingController): else: frappe.throw(_("Invalid lost reason {0}, please create a new lost reason").format(frappe.bold(reason.get('lost_reason')))) + for competitor in competitors: + self.append('competitors', competitor) + self.update_opportunity('Lost') self.update_lead() self.save() diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index a86e60494e..20504789aa 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -473,6 +473,12 @@ frappe.ui.form.on(cur_frm.doctype, { "options": frm.doctype === 'Opportunity' ? 'Opportunity Lost Reason Detail': 'Quotation Lost Reason Detail', "reqd": 1 }, + { + "fieldtype": "Table MultiSelect", + "label": __("Competitors"), + "fieldname": "competitors", + "options": "Competitor Detail" + }, { "fieldtype": "Text", "label": __("Detailed Reason"), @@ -480,27 +486,25 @@ frappe.ui.form.on(cur_frm.doctype, { }, ], primary_action: function() { - var values = dialog.get_values(); - var reasons = values["lost_reason"]; - var detailed_reason = values["detailed_reason"]; + let values = dialog.get_values(); frm.call({ doc: frm.doc, method: 'declare_enquiry_lost', args: { - 'lost_reasons_list': reasons, - 'detailed_reason': detailed_reason + 'lost_reasons_list': values.lost_reason, + 'competitors': values.competitors, + 'detailed_reason': values.detailed_reason }, callback: function(r) { dialog.hide(); frm.reload_doc(); }, }); - refresh_field("lost_reason"); }, primary_action_label: __('Declare Lost') }); dialog.show(); } -}) +}) \ No newline at end of file From e498389b00a2edadff47454e2cc55465d5d1bd52 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 10 Nov 2021 12:02:07 +0530 Subject: [PATCH 05/10] fix: ignore cancelled entries in incorrect balance qty report --- .../incorrect_balance_qty_after_transaction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py b/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py index a381820ca2..6aa12ac2c9 100644 --- a/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py +++ b/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py @@ -46,7 +46,7 @@ def get_incorrect_data(data): return row def get_stock_ledger_entries(report_filters): - filters = {} + filters = {"is_cancelled": 0} fields = ['name', 'voucher_type', 'voucher_no', 'item_code', 'actual_qty', 'posting_date', 'posting_time', 'company', 'warehouse', 'qty_after_transaction', 'batch_no'] From 2f004693c36f3dc34c2ef96889fb17e28f2bd385 Mon Sep 17 00:00:00 2001 From: Anuja Pawar <60467153+Anuja-pawar@users.noreply.github.com> Date: Wed, 10 Nov 2021 12:36:54 +0530 Subject: [PATCH 06/10] fix(Bank Reconciliation): get credit amount for bank account of type liability --- .../bank_reconciliation_tool.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py index 002e312a39..5cbf00b2c6 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -342,7 +342,15 @@ def get_pe_matching_query(amount_condition, account_from_to, transaction): def get_je_matching_query(amount_condition, transaction): # get matching journal entry query - cr_or_dr = "credit" if transaction.withdrawal > 0 else "debit" + + company_account = frappe.get_value("Bank Account", transaction.bank_account, "account") + root_type = frappe.get_value("Account", company_account, "root_type") + + if root_type == "Liability": + cr_or_dr = "debit" if transaction.withdrawal > 0 else "credit" + else: + cr_or_dr = "credit" if transaction.withdrawal > 0 else "debit" + return f""" SELECT From 12e81df2b79a0c7fb7cedb3e467837b60540be04 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 10 Nov 2021 12:36:00 +0530 Subject: [PATCH 07/10] fix: default value for allow neg stock in repost_item_valuation Negative stock can be toggled back after queuing transactions, this causes failure when repost is executed. Now allow_negative_stock stock is set at time of queuing the repost job. This means setting changes done afterwards won't affect already submitted reposts. --- .../doctype/repost_item_valuation/repost_item_valuation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index 86b4b860f8..170aa7f76c 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -31,6 +31,9 @@ class RepostItemValuation(Document): self.voucher_type = None self.voucher_no = None + self.allow_negative_stock = self.allow_negative_stock or \ + cint(frappe.db.get_single_value("Stock Settings", "allow_negative_stock")) + def set_company(self): if self.voucher_type and self.voucher_no: self.company = frappe.get_cached_value(self.voucher_type, self.voucher_no, "company") From 6d05bb527432c7fb70794634c7c51692b25bdbfe Mon Sep 17 00:00:00 2001 From: Saqib Date: Wed, 10 Nov 2021 13:06:55 +0530 Subject: [PATCH 08/10] fix(pos): get mode of payments query (#28321) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index cd270f505e..59d46fc2e8 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -2029,7 +2029,7 @@ def get_mode_of_payments_info(mode_of_payments, company): mpa.parent = mp.name and mpa.company = %s and mp.enabled = 1 and - mp.name in (%s) + mp.name in %s group by mp.name """, (company, mode_of_payments), as_dict=1) From b728597ef41dc27ddca4531f22109834bb4268ab Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 10 Nov 2021 17:59:07 +0530 Subject: [PATCH 09/10] fix: use hotfix branches for patch tests --- .github/workflows/patch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index f8abb6c774..97bccf5d56 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -93,7 +93,7 @@ jobs: for version in $(seq 12 13) do echo "Updating to v$version" - branch_name="version-$version" + branch_name="version-$version-hotfix" git -C "apps/frappe" fetch --depth 1 upstream $branch_name:$branch_name git -C "apps/erpnext" fetch --depth 1 upstream $branch_name:$branch_name From c96b5492dbe860e40f82497a6972cc1cb29071a5 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 10 Nov 2021 19:04:37 +0530 Subject: [PATCH 10/10] fix: reload doctype forcefully --- erpnext/patches/v13_0/create_pan_field_for_india.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/patches/v13_0/create_pan_field_for_india.py b/erpnext/patches/v13_0/create_pan_field_for_india.py index c37651aaa3..6df6e1eb32 100644 --- a/erpnext/patches/v13_0/create_pan_field_for_india.py +++ b/erpnext/patches/v13_0/create_pan_field_for_india.py @@ -5,6 +5,7 @@ from frappe.custom.doctype.custom_field.custom_field import create_custom_fields def execute(): frappe.reload_doc('buying', 'doctype', 'supplier', force=True) frappe.reload_doc('selling', 'doctype', 'customer', force=True) + frappe.reload_doc('core', 'doctype', 'doctype', force=True) custom_fields = { 'Supplier': [