跳至內容
選單
此問題已被標幟
1 回覆
4174 瀏覽次數

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 


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
12月 23
15697
0
10月 23
33
3
10月 23
790
1
10月 23
569
0
10月 23
1590