refactor!: remove redundant title field from sales transactions (#45115)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
Raffael Meyer
2025-01-22 12:35:41 +01:00
committed by GitHub
parent 5207917993
commit be2593bb51
11 changed files with 8 additions and 74 deletions

View File

@@ -8,7 +8,6 @@
"engine": "InnoDB",
"field_order": [
"customer_section",
"title",
"naming_series",
"customer",
"customer_name",
@@ -192,16 +191,6 @@
"fieldtype": "Section Break",
"options": "fa fa-user"
},
{
"allow_on_submit": 1,
"default": "{customer_name}",
"fieldname": "title",
"fieldtype": "Data",
"hidden": 1,
"label": "Title",
"no_copy": 1,
"print_hide": 1
},
{
"bold": 1,
"fieldname": "naming_series",
@@ -1584,7 +1573,7 @@
"icon": "fa fa-file-text",
"is_submittable": 1,
"links": [],
"modified": "2024-11-26 13:10:50.309570",
"modified": "2025-01-06 15:03:19.957277",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Invoice",
@@ -1635,7 +1624,7 @@
"sort_order": "DESC",
"states": [],
"timeline_field": "customer",
"title_field": "title",
"title_field": "customer_name",
"track_changes": 1,
"track_seen": 1
}

View File

@@ -161,7 +161,6 @@ class POSInvoice(SalesInvoice):
terms: DF.TextEditor | None
territory: DF.Link | None
timesheets: DF.Table[SalesInvoiceTimesheet]
title: DF.Data | None
to_date: DF.Date | None
total: DF.Currency
total_advance: DF.Currency

View File

@@ -7,7 +7,6 @@
"engine": "InnoDB",
"field_order": [
"customer_section",
"title",
"naming_series",
"customer",
"customer_name",
@@ -229,18 +228,6 @@
"hide_seconds": 1,
"options": "fa fa-user"
},
{
"allow_on_submit": 1,
"default": "{customer_name}",
"fieldname": "title",
"fieldtype": "Data",
"hidden": 1,
"hide_days": 1,
"hide_seconds": 1,
"label": "Title",
"no_copy": 1,
"print_hide": 1
},
{
"bold": 1,
"fieldname": "naming_series",
@@ -2275,7 +2262,7 @@
"sort_order": "DESC",
"states": [],
"timeline_field": "customer",
"title_field": "title",
"title_field": "customer_name",
"track_changes": 1,
"track_seen": 1
}

View File

@@ -206,7 +206,6 @@ class SalesInvoice(SellingController):
terms: DF.TextEditor | None
territory: DF.Link | None
timesheets: DF.Table[SalesInvoiceTimesheet]
title: DF.Data | None
to_date: DF.Date | None
total: DF.Currency
total_advance: DF.Currency

View File

@@ -9,7 +9,6 @@ def execute():
update tabQuotation, tabCustomer
set
tabQuotation.customer_name = tabCustomer.customer_name,
tabQuotation.title = tabCustomer.customer_name
where
tabQuotation.customer_name is null
and tabQuotation.party_name = tabCustomer.name
@@ -24,7 +23,6 @@ def execute():
update tabQuotation, tabLead
set
tabQuotation.customer_name = case when ifnull(tabLead.company_name, '') != '' then tabLead.company_name else tabLead.lead_name end,
tabQuotation.title = case when ifnull(tabLead.company_name, '') != '' then tabLead.company_name else tabLead.lead_name end
where
tabQuotation.customer_name is null
and tabQuotation.party_name = tabLead.name

View File

@@ -10,7 +10,6 @@
"engine": "InnoDB",
"field_order": [
"customer_section",
"title",
"naming_series",
"quotation_to",
"party_name",
@@ -142,16 +141,6 @@
"fieldtype": "Section Break",
"options": "fa fa-user"
},
{
"allow_on_submit": 1,
"default": "{customer_name}",
"fieldname": "title",
"fieldtype": "Data",
"hidden": 1,
"label": "Title",
"no_copy": 1,
"print_hide": 1
},
{
"fieldname": "naming_series",
"fieldtype": "Select",
@@ -1106,7 +1095,7 @@
"idx": 82,
"is_submittable": 1,
"links": [],
"modified": "2024-11-26 12:43:29.293637",
"modified": "2025-01-06 15:00:08.774925",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation",
@@ -1203,5 +1192,5 @@
"sort_order": "DESC",
"states": [],
"timeline_field": "party_name",
"title_field": "title"
"title_field": "customer_name"
}

View File

@@ -107,7 +107,6 @@ class Quotation(SellingController):
tc_name: DF.Link | None
terms: DF.TextEditor | None
territory: DF.Link | None
title: DF.Data | None
total: DF.Currency
total_net_weight: DF.Float
total_qty: DF.Float

View File

@@ -11,7 +11,6 @@
"field_order": [
"customer_section",
"column_break0",
"title",
"naming_series",
"customer",
"customer_name",
@@ -186,18 +185,6 @@
"oldfieldtype": "Column Break",
"width": "50%"
},
{
"allow_on_submit": 1,
"default": "{customer_name}",
"fieldname": "title",
"fieldtype": "Data",
"hidden": 1,
"hide_days": 1,
"hide_seconds": 1,
"label": "Title",
"no_copy": 1,
"print_hide": 1
},
{
"fieldname": "naming_series",
"fieldtype": "Select",
@@ -1690,7 +1677,7 @@
"idx": 105,
"is_submittable": 1,
"links": [],
"modified": "2024-11-26 12:42:06.872527",
"modified": "2025-01-06 15:01:45.771616",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",

View File

@@ -175,7 +175,6 @@ class SalesOrder(SellingController):
tc_name: DF.Link | None
terms: DF.TextEditor | None
territory: DF.Link | None
title: DF.Data | None
to_date: DF.Date | None
total: DF.Currency
total_commission: DF.Currency

View File

@@ -8,7 +8,6 @@
"document_type": "Document",
"engine": "InnoDB",
"field_order": [
"title",
"naming_series",
"customer",
"tax_id",
@@ -171,16 +170,6 @@
"connections_tab"
],
"fields": [
{
"allow_on_submit": 1,
"default": "{customer_name}",
"fieldname": "title",
"fieldtype": "Data",
"hidden": 1,
"label": "Title",
"no_copy": 1,
"print_hide": 1
},
{
"fieldname": "naming_series",
"fieldtype": "Select",
@@ -1436,7 +1425,7 @@
"idx": 146,
"is_submittable": 1,
"links": [],
"modified": "2024-11-26 12:44:28.258215",
"modified": "2025-01-06 15:02:30.558756",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",
@@ -1533,7 +1522,7 @@
"sort_order": "DESC",
"states": [],
"timeline_field": "customer",
"title_field": "title",
"title_field": "customer_name",
"track_changes": 1,
"track_seen": 1
}

View File

@@ -128,7 +128,6 @@ class DeliveryNote(SellingController):
tc_name: DF.Link | None
terms: DF.TextEditor | None
territory: DF.Link | None
title: DF.Data | None
total: DF.Currency
total_commission: DF.Currency
total_net_weight: DF.Float