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.

1

Can you use the dot notation in XML attrs?

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

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

1 follower(s)

Stats

Asked: 4/9/13, 8:39 AM
Seen: 1642 times
Last updated: 3/16/15, 8:10 AM