refactor: remove unused customer field in Item DocType (backport #55277) (#55283)

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
mergify[bot]
2026-05-26 05:47:16 +00:00
committed by GitHub
parent 03d96c7b85
commit ca6bcb57d3
3 changed files with 1 additions and 15 deletions

View File

@@ -286,7 +286,6 @@ frappe.ui.form.on("Item", {
frm.set_df_property(fieldname, "read_only", stock_exists); frm.set_df_property(fieldname, "read_only", stock_exists);
}); });
frm.set_df_property("is_fixed_asset", "read_only", frm.doc.__onload?.asset_exists ? 1 : 0); frm.set_df_property("is_fixed_asset", "read_only", frm.doc.__onload?.asset_exists ? 1 : 0);
frm.toggle_reqd("customer", frm.doc.is_customer_provided_item ? 1 : 0);
}, },
validate: function (frm) { validate: function (frm) {
@@ -297,10 +296,6 @@ frappe.ui.form.on("Item", {
refresh_field("image_view"); refresh_field("image_view");
}, },
is_customer_provided_item: function (frm) {
frm.toggle_reqd("customer", frm.doc.is_customer_provided_item ? 1 : 0);
},
is_fixed_asset: function (frm) { is_fixed_asset: function (frm) {
// set serial no to false & toggles its visibility // set serial no to false & toggles its visibility
frm.set_value("has_serial_no", 0); frm.set_value("has_serial_no", 0);

View File

@@ -31,7 +31,6 @@
"column_break_kpmi", "column_break_kpmi",
"is_purchase_item", "is_purchase_item",
"is_customer_provided_item", "is_customer_provided_item",
"customer",
"section_break_gjns", "section_break_gjns",
"standard_rate", "standard_rate",
"column_break_ixrh", "column_break_ixrh",
@@ -632,13 +631,6 @@
"read_only_depends_on": "eval: doc.is_purchase_item", "read_only_depends_on": "eval: doc.is_purchase_item",
"show_description_on_click": 1 "show_description_on_click": 1
}, },
{
"depends_on": "eval:doc.is_customer_provided_item",
"fieldname": "customer",
"fieldtype": "Link",
"label": "Customer",
"options": "Customer"
},
{ {
"depends_on": "eval:!doc.is_fixed_asset", "depends_on": "eval:!doc.is_fixed_asset",
"fieldname": "supplier_details", "fieldname": "supplier_details",
@@ -1077,7 +1069,7 @@
"image_field": "image", "image_field": "image",
"links": [], "links": [],
"make_attachments_public": 1, "make_attachments_public": 1,
"modified": "2026-04-28 17:31:47.613279", "modified": "2026-05-26 10:18:46.862670",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Item", "name": "Item",

View File

@@ -82,7 +82,6 @@ class Item(Document):
brand: DF.Link | None brand: DF.Link | None
country_of_origin: DF.Link | None country_of_origin: DF.Link | None
create_new_batch: DF.Check create_new_batch: DF.Check
customer: DF.Link | None
customer_code: DF.SmallText | None customer_code: DF.SmallText | None
customer_items: DF.Table[ItemCustomerDetail] customer_items: DF.Table[ItemCustomerDetail]
customs_tariff_number: DF.Link | None customs_tariff_number: DF.Link | None