Odoo Help

0

Show or hide a field based on Domain from its Parent (Many2One Object)

By
Aspirant Labs India Pvt Ltd
on 10/29/13, 10:35 AM 962 views

Hi,

I need to show or hide a field in the Form View of the "Add Object" based on the values from the Parent Object.

For example, I have a field demo_field1 in sale_order. When I create a Sale Order Line, I do not want to show the field "th_weight" if the demo_field1 for the Sale Order is greater than 200.

using attrs="{'invisible': [('demo_field', '>', '200')]}" or attrs="{'invisible': [('order_id.demo_field', '>', '200')]}" shows invalid field in domain.

How to achieve this?

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

1 follower(s)

Stats

Asked: 10/29/13, 10:35 AM
Seen: 962 times
Last updated: 3/16/15, 8:10 AM