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

Suppose i am declaring a field like

name = fields.Char()

and i can call python function using compute attribute in this case.

but if i declare a field like

category = fields.Many2one('album_files')

how can i call a function i this case. 

Аватар
Відмінити
Найкраща відповідь

Hello, 
You can define like

category = fields.Many2one('sale.order',compute='album_files')

For Compute method: 

If your category filed depends on any other file than you can use @api.depends and in this case your filed value store=True otherwise you can use @api.multi your field value store=False

Thanks 


Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
Odoo Mail Sending Limit Вирішено
2
груд. 23
15611
0
жовт. 23
33
3
жовт. 23
790
1
жовт. 23
569
0
жовт. 23
1544