Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
9689 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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)

Ảnh đại diện
Huỷ bỏ
Tác giả

OK, you already gave an alternative solution! Thanks!

Tác giả

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.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 24
5850
2
thg 7 18
8116
1
thg 3 15
12061
0
thg 3 15
4571
2
thg 9 24
4490