Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
9783 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

OK, you already gave an alternative solution! Thanks!

Autor

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.

Related Posts Odpovědi Zobrazení Aktivita
1
bře 24
6569
2
čvc 18
8163
1
bře 15
12152
0
bře 15
4638
2
zář 24
4563