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

hey guys, I created a many2one field via odoo Studio. Is it possible to define a compute method via studio itself??, or any other way's are possible??

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

Open the FIELD record that has been created, and defined the COMPUTE METHOD at the very bottom:


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

I've never tried but i think it's not possible to do it directly from odoo studio. You'll need to update your field in python to add the attribute compute and declare your compute function
When you add a field via Odoo studio, it creates a xml file and put records in ir.model.fields that creates the field in postgresql

Ảnh đại diện
Huỷ bỏ