Odoo Help


How to Change string/label field dynamically in tree view?

on 3/27/16, 4:40 PM 1,015 views


I would like to change colonne's label/string when changing boolean value:

This solution didn't work:


<field name="product_uom_qty" attrs="{'invisible': [('x_is_line_commission','==', True)]}" string="Ordered Qty" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}" />

<field name="product_uom_qty" attrs="{'invisible': [('x_is_line_commission','!=', True)]}" string="Ordered Value" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}" />


And this solution it work only in form view but didn't work with tree view


And i didn't  know if this solution work or not :


Thx for support


Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
--Ahmed M.Elmubarak--

Ahmed M.Elmubarak
On 3/28/16, 7:58 AM


The method fields_view_get called before rendering the view, so you can override this function to change the 

label string of your fields in a tree view ...

hope this could help

On 3/27/16, 8:08 PM

Unfortunately,For This moment it's not possible to change label tree form dynamically.

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


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

1 follower(s)


Asked: 3/27/16, 4:40 PM
Seen: 1015 times
Last updated: 3/28/16, 7:58 AM