تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
6 الردود
8626 أدوات العرض

Hello

I have a module created for helpdesk tickets. I have a menu called public tickets that will show all tickets created regardless of user. What I would like is a second menu called "my tickets" which just shows ticket that I have created and/or responsible for.

I started with a menu item:

<menuitem id="helpdesk_mytickets_menu" name="My Tickets" parent="helpdesk_menu" action="helpdesk_mytickets_action"/>

and I created a view dependant on Public Ticket. Both are showing same results so I tried to add a filter to My tickets view:

<field name="responsible_id" domain="[('responsible_id', '=', res_users_id"/>

This is not working

Not sure what I need to do here. Is it best to create a new module and inherit? (tried but menu didn't appear) or

can I just add a filter to current module and get it to show up in "my tickets" menu?

الصورة الرمزية
إهمال
أفضل إجابة

You can set domain in your action of this menu My Tickets.

in helpdesk_mytickets_action action you can set domain

<field name="domain">[('responsible_id','=',uid)]</field>

NOTE: responsible_id should be m2o with res.users


الصورة الرمزية
إهمال
الكاتب

Brilliant.. thank you!!

You welcome

أفضل إجابة

Hi Siobhan,

Is your module publicly available for sharing?

الصورة الرمزية
إهمال
أفضل إجابة

Hello Siobhan

Please try this

<field name="domain">['|',('responsible_id.user_id','=',uid)]</field>

hope this work for you.

الصورة الرمزية
إهمال
الكاتب

This didn't work but thank you for your response Ankita

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
سبتمبر 15
4255
3
سبتمبر 15
7564
0
يوليو 25
789
1
مايو 25
1521
ADD PROPERTIES تم الحل
1
مايو 25
1728