Skip to content

Commit

Permalink
Merge pull request #42365 from frappe/mergify/bp/version-15-hotfix/pr…
Browse files Browse the repository at this point in the history
…-42307

fix: remove redundant proprietorship field from customer type and supplier type (backport #42307)
  • Loading branch information
vorasmit committed Jul 17, 2024
2 parents 55dc157 + 527781a commit bebd70d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion erpnext/buying/doctype/supplier/supplier.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
"fieldname": "supplier_type",
"fieldtype": "Select",
"label": "Supplier Type",
"options": "Company\nIndividual\nProprietorship\nPartnership",
"options": "Company\nIndividual\nPartnership",
"reqd": 1
},
{
Expand Down
2 changes: 1 addition & 1 deletion erpnext/buying/doctype/supplier/supplier.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Supplier(TransactionBase):
supplier_name: DF.Data
supplier_primary_address: DF.Link | None
supplier_primary_contact: DF.Link | None
supplier_type: DF.Literal["Company", "Individual", "Proprietorship", "Partnership"]
supplier_type: DF.Literal["Company", "Individual", "Partnership"]
tax_category: DF.Link | None
tax_id: DF.Data | None
tax_withholding_category: DF.Link | None
Expand Down
1 change: 1 addition & 0 deletions erpnext/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ erpnext.patches.v15_0.delete_saudi_doctypes
erpnext.patches.v14_0.show_loan_management_deprecation_warning
erpnext.patches.v14_0.clear_reconciliation_values_from_singles
execute:frappe.rename_doc("Report", "TDS Payable Monthly", "Tax Withholding Details", force=True)
erpnext.patches.v14_0.update_proprietorship_to_individual

[post_model_sync]
execute:frappe.delete_doc_if_exists('Workspace', 'ERPNext Integrations Settings')
Expand Down
7 changes: 7 additions & 0 deletions erpnext/patches/v14_0/update_proprietorship_to_individual.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import frappe


def execute():
for doctype in ["Customer", "Supplier"]:
field = doctype.lower() + "_type"
frappe.db.set_value(doctype, {field: "Proprietorship"}, field, "Individual")
2 changes: 1 addition & 1 deletion erpnext/selling/doctype/customer/customer.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"label": "Customer Type",
"oldfieldname": "customer_type",
"oldfieldtype": "Select",
"options": "Company\nIndividual\nProprietorship\nPartnership",
"options": "Company\nIndividual\nPartnership",
"reqd": 1
},
{
Expand Down
2 changes: 1 addition & 1 deletion erpnext/selling/doctype/customer/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Customer(TransactionBase):
customer_pos_id: DF.Data | None
customer_primary_address: DF.Link | None
customer_primary_contact: DF.Link | None
customer_type: DF.Literal["Company", "Individual", "Proprietorship", "Partnership"]
customer_type: DF.Literal["Company", "Individual", "Partnership"]
default_bank_account: DF.Link | None
default_commission_rate: DF.Float
default_currency: DF.Link | None
Expand Down

0 comments on commit bebd70d

Please sign in to comment.