Odoo Help

0

Can the nolabel attribute be passed conditionally?

By
AJ Schrafel Paper Corp
on 10/23/13, 2:50 AM 3,577 views

I want to remove the tax column from the quote/ sale tree view.

The only way i have found to get the tax column label to go away is the following:

            <xpath expr="//page[@string='Order Lines']/field[@name='order_line']/tree[@string='Sales Order Lines']//field[@name='tax_id']" position="replace">
                <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"
                invisible="1" nolabel="1"/>
            </xpath>

I would like the change to be conditional like this, but it does not seem to work, am I doing something wrong or is this not supported yet?

<xpath expr="//page[@string='Order Lines']/field[@name='order_line']/tree[@string='Sales Order Lines']//field[@name='tax_id']" position="attributes">
     <attribute name="attrs">{'invisible': [('prod_type','=','itemized'),'nolabel': [('prod_type','=','itemized')]]}</attribute>
                </xpath>

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 10/23/13, 2:50 AM
Seen: 3577 times
Last updated: 3/16/15, 8:10 AM