Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4167 Lượt xem

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. 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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 


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 12 23
15669
0
thg 10 23
33
3
thg 10 23
790
1
thg 10 23
569
0
thg 10 23
1587