fix: remove proprietorship and update it with individual

(cherry picked from commit c8ad6d1b2c)
This commit is contained in:
Sanket322
2024-07-12 18:58:14 +05:30
committed by Mergify
parent 55dc157694
commit 527781a588
6 changed files with 12 additions and 4 deletions

View File

@@ -174,7 +174,7 @@
"fieldname": "supplier_type",
"fieldtype": "Select",
"label": "Supplier Type",
"options": "Company\nIndividual\nProprietorship\nPartnership",
"options": "Company\nIndividual\nPartnership",
"reqd": 1
},
{

View File

@@ -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

View File

@@ -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')

View File

@@ -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")

View File

@@ -134,7 +134,7 @@
"label": "Customer Type",
"oldfieldname": "customer_type",
"oldfieldtype": "Select",
"options": "Company\nIndividual\nProprietorship\nPartnership",
"options": "Company\nIndividual\nPartnership",
"reqd": 1
},
{

View File

@@ -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