Odoo Help


Can you use the dot notation in XML attrs?

Hannes Smit
on 4/9/13, 8:39 AM 2,374 views

Is it possible to use the following?:

<field .. .. attrs="{'invisible': [('partner_id.name', '!=', False)]}">

The main question is: is the dot ('.') allowed?

We couldn't get it to work..

Christophe HANON
On 4/9/13, 11:03 AM

Well you could not get it works, because it does not. To make such things, you need to add fields on the current model (see fields.related)

OK, you already gave an alternative solution! Thanks!

Hannes Smit
on 4/10/13, 5:18 AM

Why does a +domain+ allow the dot notation? and attrs not? Do you know why? Or where it is documented?

Hannes Smit
on 4/10/13, 5:20 AM

A related field in not set till you save. What happens if you've got a boolean and depending on the setting of the boolean you will be able to see certain fields.

on 4/10/13, 11:17 AM

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: 4/9/13, 8:39 AM
Seen: 2374 times
Last updated: 3/16/15, 8:10 AM