Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
9707 มุมมอง

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
5915
2
ก.ค. 18
8121
1
มี.ค. 15
12074
0
มี.ค. 15
4580
2
ก.ย. 24
4503