Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cbcb3ccb12 | ||
|
95a69671dd |
2
helpdesk_portal_ticket_custom/.gitignore
vendored
Normal file
2
helpdesk_portal_ticket_custom/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.*~
|
||||
*pyc
|
37
helpdesk_portal_ticket_custom/README.md
Normal file
37
helpdesk_portal_ticket_custom/README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
====================================
|
||||
helpdesk_portal_ticket_custom
|
||||
====================================
|
||||
|
||||
Customization for ticket portal view.
|
||||
|
||||
# Installation
|
||||
|
||||
Use Odoo normal module installation procedure to install
|
||||
`helpdesk_portal_ticket_custom`.
|
||||
|
||||
# Known issues / Roadmap
|
||||
|
||||
None yet.
|
||||
|
||||
# Bug Tracker
|
||||
|
||||
Bugs are tracked on `our issues website <https://github.com/elabore-coop/helpdesk-tools/issues>`\_. In case of
|
||||
trouble, please check there if your issue has already been
|
||||
reported. If you spotted it first, help us smashing it by providing a
|
||||
detailed and welcomed feedback.
|
||||
|
||||
# Credits
|
||||
|
||||
## Contributors
|
||||
|
||||
- Joris Scampucci
|
||||
|
||||
## Funders
|
||||
|
||||
The development of this module has been financially supported by:
|
||||
|
||||
- Elabore (https://elabore.coop)
|
||||
|
||||
## Maintainer
|
||||
|
||||
This module is maintained by Elabore.
|
0
helpdesk_portal_ticket_custom/__init__.py
Normal file
0
helpdesk_portal_ticket_custom/__init__.py
Normal file
35
helpdesk_portal_ticket_custom/__manifest__.py
Normal file
35
helpdesk_portal_ticket_custom/__manifest__.py
Normal file
@@ -0,0 +1,35 @@
|
||||
# Copyright 2024 Joris Scampucci" (Elabore)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "helpdesk_portal_ticket_custom",
|
||||
"version": "16.0.1.0.0",
|
||||
"author": "Elabore",
|
||||
"website": "https://elabore.coop",
|
||||
"maintainer": "Joris Scampucci",
|
||||
"license": "AGPL-3",
|
||||
"category": "Tools",
|
||||
"summary": "Customization for ticket portal view.",
|
||||
# any module necessary for this one to work correctly
|
||||
"depends": [
|
||||
"base",
|
||||
"helpdesk_mgmt",
|
||||
],
|
||||
"qweb": [],
|
||||
"external_dependencies": {
|
||||
"python": [],
|
||||
},
|
||||
# always loaded
|
||||
"data": [
|
||||
"views/portal_ticket_views.xml",
|
||||
],
|
||||
# only loaded in demonstration mode
|
||||
"demo": [],
|
||||
"js": [],
|
||||
"css": [],
|
||||
"installable": True,
|
||||
# Install this module automatically if all dependency have been previously
|
||||
# and independently installed. Used for synergetic or glue modules.
|
||||
"auto_install": False,
|
||||
"application": False,
|
||||
}
|
43
helpdesk_portal_ticket_custom/views/portal_ticket_views.xml
Normal file
43
helpdesk_portal_ticket_custom/views/portal_ticket_views.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="ticket_priority_widget_template" name="Priority Widget Template">
|
||||
<span t-attf-class="o_priority_star fa fa-star#{'' if ticket.priority >= ticket_priority else '-o'}" t-attf-title="Priorité: {{'Très haute' if ticket.priority == '3' else 'Haute' if ticket.priority == '2' else 'Moyenne' if ticket.priority == '1' else 'Basse'}}" />
|
||||
</template>
|
||||
|
||||
<template id="ticket_priority_3_stars_template" name="Priority 3 Stars Widget Template">
|
||||
<t t-call="helpdesk_portal_ticket_custom.ticket_priority_widget_template">
|
||||
<t t-set="ticket_priority" t-value="'1'"/>
|
||||
</t>
|
||||
<t t-call="helpdesk_portal_ticket_custom.ticket_priority_widget_template">
|
||||
<t t-set="ticket_priority" t-value="'2'"/>
|
||||
</t>
|
||||
<t t-call="helpdesk_portal_ticket_custom.ticket_priority_widget_template">
|
||||
<t t-set="ticket_priority" t-value="'3'"/>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- Ticket portal list -->
|
||||
<template id="portal_ticket_list_inherit" inherit_id="helpdesk_mgmt.portal_ticket_list" priority="1">
|
||||
<!-- Add priority field -->
|
||||
<xpath expr="//thead/tr/th[2]" position="after">
|
||||
<th>Priorité</th>
|
||||
</xpath>
|
||||
<xpath expr="//tbody/t/tr/td[2]" position="after">
|
||||
<td>
|
||||
<t t-call="helpdesk_portal_ticket_custom.ticket_priority_3_stars_template">
|
||||
</t>
|
||||
</td>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="portal_ticket_form_inherit" inherit_id="helpdesk_mgmt.portal_helpdesk_ticket_page">
|
||||
<xpath expr="//div[@class='col-9']" position="before">
|
||||
<div>
|
||||
<t t-call="helpdesk_portal_ticket_custom.ticket_priority_3_stars_template">
|
||||
</t>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
Reference in New Issue
Block a user