Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
9638 Представления

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

Аватар
Отменить
Лучший ответ

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!

Автор

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 Ответы Просмотры Активность
1
мар. 24
5618
2
июл. 18
8078
1
мар. 15
12014
0
мар. 15
4521
2
сент. 24
4427