Skip to Content
Menu
This question has been flagged
1 Reply
385 Views

I hope this message finds you well.

I am currently using Odoo Community 17 and would like to request a customization for the product list display. At present, the list shows the product prices, but I would like to adjust it to display the following information instead:

  1. Product Name
  2. Product Reference
  3. Product Category

I believe this change will better suit our needs and improve the clarity of our product management. Could you please provide guidance on how to achieve this customization, or let me know if there is a specific module or code adjustment required?

Thank you for your assistance.

Best regards,

Avatar
Discard
Best Answer

Hii,


Identify the view to customize

The product list is usually the product.template tree view (product_template_tree_view).

In Odoo 17, the default list view for products is often defined in XML with ID product.product_template_tree_view or similar.

Create a custom XML view to modify the tree view

You can create a small custom module or use the Studio app (if available) or the developer mode's UI editor to inherit and modify the tree view.

Here’s a simple example of an XML snippet that you can add in a custom module to override the product tree view:
<?xml version="1.0" encoding="UTF-8"?>

<odoo>

  <record id="view_product_template_tree_custom" model="ir.ui.view">

    <field name="name">product.template.tree.custom</field>

    <field name="model">product.template</field>

    <field name="inherit_id" ref="product.product_template_tree_view"/>

    <field name="arch" type="xml">

      <!-- Remove price column -->

      <xpath expr="//field[@name='list_price']" position="replace">

        <!-- Remove the price column -->

      </xpath>


      <!-- Adjust columns: show name, default_code (product reference), categ_id -->

      <xpath expr="//tree" position="inside">

        <field name="name" string="Product Name"/>

        <field name="default_code" string="Product Reference"/>

        <field name="categ_id" string="Product Category"/>

      </xpath>

    </field>

  </record>

</odoo>


Load this XML via a custom module

  • Create a minimal custom module (or use Studio) to load this XML.

​Update the module and refresh your Odoo.

and second option for this :


Use Odoo Developer Mode UI Editor

Activate developer mode (?debug=1 in URL).

Open the product list.

Click the debug menu (bug icon top-right) → Edit View: List.

Modify the fields shown: remove list_price, add default_code and categ_id.

Save and refresh.

i hope it is help full

Avatar
Discard