Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3775 Переглядів

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
15939
3
вер. 23
11587
0
лип. 19
3227
1
серп. 17
4289
4
квіт. 17
4563