Odoo Help

Welcome!

This community 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.

0

Can the nolabel attribute be passed conditionally?

By
AJ Schrafel Paper Corp
on 10/23/13, 2:50 AM 2,731 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>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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