[17.0][ADD] helpdesk_mgmt_partner_dashboard: New Module - #1093
cgarcia-solvos wants to merge 1 commit into
Conversation
412abee to
cce5c5c
Compare
dalonsod
left a comment
There was a problem hiding this comment.
Only code review, see initial comments.
And also, grouping partners attending at their hierarchy could be a better option. Only partners with no parent should be displayed, and for a certain partner, tickets count should include their tickets and for their childrens as well.
| @@ -0,0 +1,198 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
There was a problem hiding this comment.
There are two different models with views here, please separate them (a view file for each model)
|
|
||
| <record id="helpdesk_ticket_partner_kanban_view" model="ir.ui.view"> | ||
| <field name="name">helpdesk.ticket.partner.kanban</field> | ||
| <field name="model">res.partner</field> |
There was a problem hiding this comment.
In order to prevent that this view is used as normal kanban view from other res.partner actions, set a low priority.
| <field name="name">helpdesk.ticket.partner.kanban</field> | ||
| <field name="model">res.partner</field> | ||
| <field name="arch" type="xml"> | ||
| <kanban class="oe_background_grey o_kanban_dashboard" create="0"> |
There was a problem hiding this comment.
Is it possible to add partner avatar/image to this view?
| <record id="helpdesk_ticket_partner_tree_view" model="ir.ui.view"> | ||
| <field name="name">helpdesk.ticket.partner.tree</field> | ||
| <field name="model">res.partner</field> | ||
| <field name="arch" type="xml"> |
There was a problem hiding this comment.
Regarding view priority, the same as above
c015b8b to
e844929
Compare
| "version": "17.0.1.0.0", | ||
| "license": "AGPL-3", | ||
| "category": "After-Sales", | ||
| "author": "Odoo Community Association (OCA)", |
There was a problem hiding this comment.
Its author is missing.
e844929 to
6ca99cc
Compare
dalonsod
left a comment
There was a problem hiding this comment.
Functional review, see comment
| todo_ticket_count = fields.Integer( | ||
| string="Number of tickets", | ||
| compute="_compute_todo_tickets", | ||
| store=True, |
There was a problem hiding this comment.
By default, compute method for stored fields is executed as sudo (compute_sudo=True); when the field is not stored user's permissions are taken in account, because sudo is not used.
Then, store=True here has an undesired effect: users see that there are some tickets to do, and when are trying to access them, they're gone (e.g. those tickets that belong to other users, for a user with limited access to its own tickets). For these count fields store=True should be avoided.
Please take a look and try to move this field back to store=False, in order to be applied again user's permissions.
9c97ce8 to
c361ecc
Compare
dalonsod
left a comment
There was a problem hiding this comment.
Search technique for todo_ticket_count is a little strange for me, but it seems to work, for the desired purpose is ok.
|
@ChristianSantamaria @IriaAlonso could you review? Thanks! |
c361ecc to
3dd1714
Compare
Replace the Helpdesk team dashboard with one grouped by partner.