Search code examples
odooodoo-12

Remove fields to sales report Odoo v12


I want my quote reports, orders and invoices in Odoo v12 to be rendered without the price or quantity field for each item. I'm learning Odoo, and it's my first time doing an inheritance with reports. However I do not know where the file that I inherit and modify is located, and what part of the code.

I appreciate your help.


Solution

  • Ok, so I have a couple ways that you can hide this information.

    The first way will leave the column headers in the tree views and in actuality leaves this information in the view but makes it invisible:

    <xpath expr="//field[@name='field_name']" position="attributes">
        <attribute name="invisible">1</attribute>
    </xpath>
    

    The second way is to completely remove the field from the view:

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