Skip to content

Commit

Permalink
[IMP] helpdesk_mgmt_project: Add groups="helpdesk_mgmt.group_helpdesk…
Browse files Browse the repository at this point in the history
…_user_own" to project fields
  • Loading branch information
victoralmau committed Sep 16, 2024
1 parent 16d812e commit 52ed1d8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
7 changes: 6 additions & 1 deletion helpdesk_mgmt_project/views/project_task_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
icon="fa-file"
name="%(ticket_action_from_project)d"
context="{'search_default_task_id': id, 'default_task_id': id, 'search_default_project_id': project_id, 'default_project_id': project_id}"
groups="helpdesk_mgmt.group_helpdesk_user_own"
>
<field string="Tickets" name="ticket_count" widget="statinfo" />
</button>
Expand All @@ -26,6 +27,7 @@
string="Open Tickets"
name="open_tickets"
domain="[('todo_ticket_count', '&gt;', 0)]"
groups="helpdesk_mgmt.group_helpdesk_user_own"
/>
</xpath>
</field>
Expand All @@ -35,7 +37,10 @@
<field name="inherit_id" ref="project.view_task_kanban" />
<field name="arch" type="xml">
<div class="oe_kanban_bottom_right" position="before">
<div attrs="{'invisible':[('ticket_count', '=', 0)]}">
<div
attrs="{'invisible':[('ticket_count', '=', 0)]}"
groups="helpdesk_mgmt.group_helpdesk_user_own"
>
<a
class="o_project_kanban_box"
name="action_view_ticket"
Expand Down
13 changes: 11 additions & 2 deletions helpdesk_mgmt_project/views/project_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
icon="fa-file"
name="%(ticket_action_from_project)d"
context="{'search_default_project_id': active_id, 'default_project_id': active_id}"
groups="helpdesk_mgmt.group_helpdesk_user_own"
>
<field string="Tickets" name="ticket_count" widget="statinfo" />
</button>
Expand All @@ -22,15 +23,22 @@
<field name="inherit_id" ref="project.view_project_kanban" />
<field name="arch" type="xml">
<xpath expr="//field[@name='task_count']" position="after">
<field name="ticket_count" />
<field name="label_tickets" />
<field
name="ticket_count"
groups="helpdesk_mgmt.group_helpdesk_user_own"
/>
<field
name="label_tickets"
groups="helpdesk_mgmt.group_helpdesk_user_own"
/>
</xpath>
<xpath expr="//a[hasclass('o_project_kanban_box')]" position="after">
<a
class="o_project_kanban_box"
name="%(ticket_action_from_project)d"
type="action"
context="{'search_default_project_id': active_id, 'default_project_id': active_id}"
groups="helpdesk_mgmt.group_helpdesk_user_own"
>
<div>
<span class="o_value">
Expand All @@ -53,6 +61,7 @@
string="Open Tickets"
name="open_tickets"
domain="[('todo_ticket_count', '&gt;', 0)]"
groups="helpdesk_mgmt.group_helpdesk_user_own"
/>
</xpath>
</field>
Expand Down

0 comments on commit 52ed1d8

Please sign in to comment.