Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
4156 Ansichten

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. 

Avatar
Verwerfen
Beste Antwort

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 


Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Dez. 23
15655
0
Okt. 23
33
3
Okt. 23
790
1
Okt. 23
569
0
Okt. 23
1584