Odoo Help

1

Can you use the dot notation in XML attrs?

By
Hannes Smit
on 4/9/13, 8:39 AM 1,886 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..

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

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

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