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

Hello everyone

I have a question about using filters.

I would like, in the "project" kanban view, to add a default filter like this:

filter name="userSpecialty" string="My specialty" domain="[('project_tag','=','XXXXXXX')]"/>

I would like the "XXXXXXX" to be a dynamic value, coming from my python code :

specialty_user = fields.Char(related='user_id.department_id.name')#Return 'Administrative'

But I can't do it :( And secondly, is it possible to also use the value from my python code to name the filter?

Like this :

filter name="userSpecialty" string="XXXXXXX" domain="[('project_tag','=','XXXXXXX')]"/>

Thank you very much for your future answers.

I tried a basic call like :

filter name="userSpecialty" string="My specialty" domain="[('project_tag','=',specialty_user )]"/>

but error :

Error: Control panel model extension failed to evaluate domain:/n{}

EDIT :

Problem with the odoo forum, I can't put the opening tags to XML, it's not an oversight

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

You can follow this: https://youtu.be/XGqXEL2qQmE

Hope it helps,

Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 24
26780
1
thg 11 22
2610
2
thg 7 22
3319
2
thg 7 22
3131
0
thg 1 22
2315