Skip to content

Commit 64157aa

Browse files
committed
[5451][ADD] helpdesk_mgmt_sale
1 parent 4022a92 commit 64157aa

21 files changed

+1117
-0
lines changed

helpdesk_mgmt_sale/README.rst

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
===================
2+
Helpdesk Sale Order
3+
===================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:cc7a2dcc843d7f24c75e4ac3eabf27aaa2432b5a6168be88b05cd1bafabb93cc
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Production/Stable
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhelpdesk-lightgray.png?logo=github
20+
:target: https://github.com/OCA/helpdesk/tree/18.0/helpdesk_mgmt_sale
21+
:alt: OCA/helpdesk
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/helpdesk-18-0/helpdesk-18-0-helpdesk_mgmt_sale
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&target_branch=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module extends the Helpdesk functionality in Odoo to allow an
32+
integration between Helpdesk tickets and sales orders. A ticket can have
33+
several sales orders associated with it, which in turn will have the
34+
ticket associated with it, allowing tickets and sales to be related.
35+
36+
**Table of contents**
37+
38+
.. contents::
39+
:local:
40+
41+
Usage
42+
=====
43+
44+
To associate orders to Helpdesk tickets:
45+
46+
1. Create or modify a Helpdesk ticket.
47+
2. In the ticket view, you will find a **Sales Order** Smartbutton which
48+
will show the number of orders associated to the ticket.
49+
3. Clicking on the Smartbutton will open a view with all the sales
50+
orders related to the current ticket.
51+
4. To create an order associated to the ticket click on the **Create**
52+
button.
53+
54+
Bug Tracker
55+
===========
56+
57+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/helpdesk/issues>`_.
58+
In case of trouble, please check there if your issue has already been reported.
59+
If you spotted it first, help us to smash it by providing a detailed and welcomed
60+
`feedback <https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_sale%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
61+
62+
Do not contact contributors directly about support or help with technical issues.
63+
64+
Credits
65+
=======
66+
67+
Authors
68+
-------
69+
70+
* Tecnativa
71+
72+
Contributors
73+
------------
74+
75+
- `Tecnativa <https://www.tecnativa.com>`__:
76+
77+
- Pilar Vargas
78+
79+
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__
80+
81+
- Bhavesh Heliconia
82+
83+
Maintainers
84+
-----------
85+
86+
This module is maintained by the OCA.
87+
88+
.. image:: https://odoo-community.org/logo.png
89+
:alt: Odoo Community Association
90+
:target: https://odoo-community.org
91+
92+
OCA, or the Odoo Community Association, is a nonprofit organization whose
93+
mission is to support the collaborative development of Odoo features and
94+
promote its widespread use.
95+
96+
This module is part of the `OCA/helpdesk <https://github.com/OCA/helpdesk/tree/18.0/helpdesk_mgmt_sale>`_ project on GitHub.
97+
98+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

helpdesk_mgmt_sale/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

helpdesk_mgmt_sale/__manifest__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2024 Tecnativa - Pilar Vargas
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
{
4+
"name": "Helpdesk Sale Order",
5+
"summary": "Add the option to select project in the sale orders.",
6+
"version": "18.0.1.0.0",
7+
"license": "AGPL-3",
8+
"category": "Sales Management",
9+
"author": "Tecnativa," "Odoo Community Association (OCA)",
10+
"website": "https://github.com/OCA/helpdesk",
11+
"depends": ["helpdesk_mgmt", "sale"],
12+
"data": [
13+
"views/helpdesk_ticket_views.xml",
14+
"views/sale_order_views.xml",
15+
],
16+
"development_status": "Production/Stable",
17+
"auto_install": True,
18+
}

helpdesk_mgmt_sale/i18n/es.po

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * helpdesk_mgmt_sale
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2024-09-23 10:06+0000\n"
10+
"Last-Translator: Pilar Vargas <[email protected]>\n"
11+
"Language-Team: none\n"
12+
"Language: es\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 5.6.2\n"
18+
19+
#. module: helpdesk_mgmt_sale
20+
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_sale.view_order_form
21+
msgid "Helpdesk"
22+
msgstr "Servicio de asistencia"
23+
24+
#. module: helpdesk_mgmt_sale
25+
#: model:ir.model,name:helpdesk_mgmt_sale.model_helpdesk_ticket
26+
msgid "Helpdesk Ticket"
27+
msgstr "Solicitud de servicio de asistencia"
28+
29+
#. module: helpdesk_mgmt_sale
30+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_helpdesk_ticket__sale_order_ids
31+
msgid "Sale Order"
32+
msgstr "Pedido de venta"
33+
34+
#. module: helpdesk_mgmt_sale
35+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_helpdesk_ticket__so_count
36+
msgid "Sale Order Count"
37+
msgstr "Nº de pedidos de venta"
38+
39+
#. module: helpdesk_mgmt_sale
40+
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_sale.ticket_view_form
41+
msgid "Sale Orders"
42+
msgstr "Pedidos"
43+
44+
#. module: helpdesk_mgmt_sale
45+
#: model:ir.model,name:helpdesk_mgmt_sale.model_sale_order
46+
msgid "Sales Order"
47+
msgstr "Pedidos"
48+
49+
#. module: helpdesk_mgmt_sale
50+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_sale_order__ticket_ids
51+
msgid "Ticket"
52+
msgstr "Solicitud"
53+
54+
#. module: helpdesk_mgmt_sale
55+
#: model:ir.actions.act_window,name:helpdesk_mgmt_sale.action_helpdesk_ticket
56+
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_sale.view_order_form
57+
msgid "Tickets"
58+
msgstr ""
59+
60+
#. module: helpdesk_mgmt_sale
61+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_sale_order__ticket_count
62+
msgid "Tickets Count"
63+
msgstr ""
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * helpdesk_mgmt_sale
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 18.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: helpdesk_mgmt_sale
17+
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_sale.view_order_form
18+
msgid "Helpdesk"
19+
msgstr ""
20+
21+
#. module: helpdesk_mgmt_sale
22+
#: model:ir.model,name:helpdesk_mgmt_sale.model_helpdesk_ticket
23+
msgid "Helpdesk Ticket"
24+
msgstr ""
25+
26+
#. module: helpdesk_mgmt_sale
27+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_helpdesk_ticket__sale_order_ids
28+
msgid "Sale Order"
29+
msgstr ""
30+
31+
#. module: helpdesk_mgmt_sale
32+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_helpdesk_ticket__so_count
33+
msgid "Sale Order Count"
34+
msgstr ""
35+
36+
#. module: helpdesk_mgmt_sale
37+
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_sale.ticket_view_form
38+
msgid "Sale Orders"
39+
msgstr ""
40+
41+
#. module: helpdesk_mgmt_sale
42+
#: model:ir.model,name:helpdesk_mgmt_sale.model_sale_order
43+
msgid "Sales Order"
44+
msgstr ""
45+
46+
#. module: helpdesk_mgmt_sale
47+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_sale_order__ticket_ids
48+
msgid "Ticket"
49+
msgstr ""
50+
51+
#. module: helpdesk_mgmt_sale
52+
#: model:ir.actions.act_window,name:helpdesk_mgmt_sale.action_helpdesk_ticket
53+
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_sale.view_order_form
54+
msgid "Tickets"
55+
msgstr ""
56+
57+
#. module: helpdesk_mgmt_sale
58+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_sale_order__ticket_count
59+
msgid "Tickets Count"
60+
msgstr ""

helpdesk_mgmt_sale/i18n/it.po

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * helpdesk_mgmt_sale
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 17.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2025-01-20 17:06+0000\n"
10+
"Last-Translator: mymage <[email protected]>\n"
11+
"Language-Team: none\n"
12+
"Language: it\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 5.6.2\n"
18+
19+
#. module: helpdesk_mgmt_sale
20+
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_sale.view_order_form
21+
msgid "Helpdesk"
22+
msgstr "Assistenza clienti"
23+
24+
#. module: helpdesk_mgmt_sale
25+
#: model:ir.model,name:helpdesk_mgmt_sale.model_helpdesk_ticket
26+
msgid "Helpdesk Ticket"
27+
msgstr "Ticket assistenza clienti"
28+
29+
#. module: helpdesk_mgmt_sale
30+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_helpdesk_ticket__sale_order_ids
31+
msgid "Sale Order"
32+
msgstr "Ordine di vendita"
33+
34+
#. module: helpdesk_mgmt_sale
35+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_helpdesk_ticket__so_count
36+
msgid "Sale Order Count"
37+
msgstr "Conteggio ordini di vendita"
38+
39+
#. module: helpdesk_mgmt_sale
40+
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_sale.ticket_view_form
41+
msgid "Sale Orders"
42+
msgstr "Ordini di vendita"
43+
44+
#. module: helpdesk_mgmt_sale
45+
#: model:ir.model,name:helpdesk_mgmt_sale.model_sale_order
46+
msgid "Sales Order"
47+
msgstr "Ordine di vendita"
48+
49+
#. module: helpdesk_mgmt_sale
50+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_sale_order__ticket_ids
51+
msgid "Ticket"
52+
msgstr "Ticket"
53+
54+
#. module: helpdesk_mgmt_sale
55+
#: model:ir.actions.act_window,name:helpdesk_mgmt_sale.action_helpdesk_ticket
56+
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_sale.view_order_form
57+
msgid "Tickets"
58+
msgstr "Ticket"
59+
60+
#. module: helpdesk_mgmt_sale
61+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_sale_order__ticket_count
62+
msgid "Tickets Count"
63+
msgstr "Conteggio ticket"

helpdesk_mgmt_sale/i18n/pt_BR.po

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * helpdesk_mgmt_sale
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 18.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: Automatically generated\n"
10+
"Language-Team: none\n"
11+
"Language: pt_BR\n"
12+
"MIME-Version: 1.0\n"
13+
"Content-Type: text/plain; charset=UTF-8\n"
14+
"Content-Transfer-Encoding: \n"
15+
"Plural-Forms: nplurals=2; plural=n > 1;\n"
16+
17+
#. module: helpdesk_mgmt_sale
18+
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_sale.view_order_form
19+
msgid "Helpdesk"
20+
msgstr ""
21+
22+
#. module: helpdesk_mgmt_sale
23+
#: model:ir.model,name:helpdesk_mgmt_sale.model_helpdesk_ticket
24+
msgid "Helpdesk Ticket"
25+
msgstr ""
26+
27+
#. module: helpdesk_mgmt_sale
28+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_helpdesk_ticket__sale_order_ids
29+
msgid "Sale Order"
30+
msgstr ""
31+
32+
#. module: helpdesk_mgmt_sale
33+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_helpdesk_ticket__so_count
34+
msgid "Sale Order Count"
35+
msgstr ""
36+
37+
#. module: helpdesk_mgmt_sale
38+
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_sale.ticket_view_form
39+
msgid "Sale Orders"
40+
msgstr ""
41+
42+
#. module: helpdesk_mgmt_sale
43+
#: model:ir.model,name:helpdesk_mgmt_sale.model_sale_order
44+
msgid "Sales Order"
45+
msgstr ""
46+
47+
#. module: helpdesk_mgmt_sale
48+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_sale_order__ticket_ids
49+
msgid "Ticket"
50+
msgstr ""
51+
52+
#. module: helpdesk_mgmt_sale
53+
#: model:ir.actions.act_window,name:helpdesk_mgmt_sale.action_helpdesk_ticket
54+
#: model_terms:ir.ui.view,arch_db:helpdesk_mgmt_sale.view_order_form
55+
msgid "Tickets"
56+
msgstr ""
57+
58+
#. module: helpdesk_mgmt_sale
59+
#: model:ir.model.fields,field_description:helpdesk_mgmt_sale.field_sale_order__ticket_count
60+
msgid "Tickets Count"
61+
msgstr ""
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import helpdesk_ticket
2+
from . import sale_order
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from odoo import Command, api, fields, models
2+
3+
4+
class HelpdeskTicket(models.Model):
5+
_inherit = "helpdesk.ticket"
6+
7+
sale_order_ids = fields.Many2many("sale.order")
8+
so_count = fields.Integer(
9+
string="Sale Order Count", compute="_compute_so_count", store=True
10+
)
11+
12+
@api.depends("sale_order_ids")
13+
def _compute_so_count(self):
14+
for ticket in self:
15+
ticket.so_count = len(ticket.sale_order_ids)
16+
17+
def action_view_sale_orders(self):
18+
"""Returns action to view sale orders related to this ticket."""
19+
action = self.env["ir.actions.actions"]._for_xml_id("sale.action_orders")
20+
action["domain"] = [("ticket_ids", "in", [self.id])]
21+
action["context"] = {
22+
"default_ticket_ids": [Command.link([self.id])],
23+
"default_partner_id": self.partner_id.id,
24+
}
25+
return action

0 commit comments

Comments
 (0)