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

I use odoo 9 for some reasons. I want to use the master's certain field value in detail view to set the required attribute. But odoo appears Uncaught Error as below:

Uncaught Error: Unknown field my_id.code in domain [[('my_id.code','=', 'A')]]

my code in py:

my_id = fields.Many2one(related='my_parent.my_id', string='my item', readonly=True)

my code in view:

<field name="selfmgt_flag" readonly="0" colspan="2" attrs="{'required': [('my_id.code','=', 'A')]}" />
อวตาร
ละทิ้ง

Try to restart the Odoo service before install/upgrade your module.

Related Posts ตอบกลับ มุมมอง กิจกรรม
5
เม.ย. 25
15969
3
ก.ย. 23
11606
0
ก.ค. 19
3250
1
ส.ค. 17
4317
4
เม.ย. 17
4645