Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

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')]}" />
Awatar
Odrzuć

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

Powiązane posty Odpowiedzi Widoki Czynność
5
kwi 25
15945
3
wrz 23
11591
0
lip 19
3232
1
sie 17
4291
4
kwi 17
4579