Skip to Content
Menu
This question has been flagged
2 Replies
2380 Views

Hi guys. I would appreciate help form any of you amazing buds out here. I want to edit change the default product view in odoo 15. To sort of 'minify' the amount of data we need to input when creating a new product.
So what i want to do is:

  • Reduce the number of tabs i.e remove the default tabs like "General Information, Atrributes & variants, sales, purchase etc' right? And have like a single, or maybe just a couple tabs instead
  • Sec, after reducing the number of tabs i want to bring all the information together. Lets say in the 'purchase' tab, there is a datafield called 'vendor taxes', i would like to take that field and put it in my new custom tab 

​N.B Because we removed the tab 'purchase', right?


​So sort of take all this datafields and put them in one place

  • After doing that, next is to remove some of the not-so-important data-fields. Those with minimal priority will be removed. As i said, I want to 'minify' the products view.



How do i? Thanks!

Avatar
Discard
Best Answer

Hi,

To achieve the customization you're describing in Odoo 15, you can follow these steps.

1. Create a Custom Module:Create a new custom module to handle the customization. You can create a module structure with the necessary files such as __manifest__.py, __init__.py, and your main module file.

2. Define the New View:
In your custom module, create a new XML file to define the modified product form view. You can use the inherit_id attribute to inherit from the existing product form view and then customize it.Example:

<record id="product_template_form_view" model="ir.ui.view">
<field name="name">product.template.form.inherit.custom.model</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
            <field name="arch" type="xml">

                     <!-- Remove the entire 'invoicing' tab -->
<xpath expr="//page[@name='invoicing']" position="replace">

                </xpath>

                      <!-- Remove the entire 'Purchase' tab -->

                <xpath expr="//notebook/page[@name='purchase']" position="replace">

               </xpath>

                      <!-- Remove the entire 'standard_price' field -->

<xpath expr="//field[@name='standard_price']" position="attributes">

                        <attribute name="invisible">1</attribute>

                </xpath>

            </field>
 </record>

3. Update the __manifest__.py File:In your __manifest__.py file, make sure to include the new XML file:
Remember to adapt the XML code and file names according to your specific requirements. 


Hope it helps

Avatar
Discard
Best Answer

I'm assuming you aren't a developer and want to do this from the front-end.

It's easy to do in Odoo studio!

Or with a little knowledge of Odoo XML you could create a new Form View that only contains the fields you need, and in one tab. Then change the Windows Action to use this new Form View and not touch the standard one. 

Avatar
Discard
Related Posts Replies Views Activity
2
Mar 23
2533
1
Sep 22
2262
2
Sep 22
3252
0
Feb 22
6
0
Nov 24
451