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

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. 

Awatar
Odrzuć
Najlepsza odpowiedź

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 


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
gru 23
15672
0
paź 23
33
3
paź 23
790
1
paź 23
569
0
paź 23
1587