Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
10305 Visualizzazioni

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

Avatar
Abbandona
Risposta migliore

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)

Avatar
Abbandona
Autore

OK, you already gave an alternative solution! Thanks!

Autore

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

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.

Post correlati Risposte Visualizzazioni Attività
1
mar 24
10813
2
lug 18
8505
1
mar 15
12634
0
mar 15
5036
2
set 24
5049