odoo-addon-helpdesk-mgmt-fieldservice 18.0.1.0.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of odoo-addon-helpdesk-mgmt-fieldservice might be problematic. Click here for more details.

Files changed (37) hide show
  1. odoo/addons/helpdesk_mgmt_fieldservice/README.rst +122 -0
  2. odoo/addons/helpdesk_mgmt_fieldservice/__init__.py +2 -0
  3. odoo/addons/helpdesk_mgmt_fieldservice/__manifest__.py +31 -0
  4. odoo/addons/helpdesk_mgmt_fieldservice/i18n/ca.po +209 -0
  5. odoo/addons/helpdesk_mgmt_fieldservice/i18n/es.po +213 -0
  6. odoo/addons/helpdesk_mgmt_fieldservice/i18n/es_AR.po +213 -0
  7. odoo/addons/helpdesk_mgmt_fieldservice/i18n/fr.po +213 -0
  8. odoo/addons/helpdesk_mgmt_fieldservice/i18n/helpdesk_mgmt_fieldservice.pot +159 -0
  9. odoo/addons/helpdesk_mgmt_fieldservice/i18n/it.po +213 -0
  10. odoo/addons/helpdesk_mgmt_fieldservice/i18n/pt_BR.po +221 -0
  11. odoo/addons/helpdesk_mgmt_fieldservice/models/__init__.py +3 -0
  12. odoo/addons/helpdesk_mgmt_fieldservice/models/fsm_location.py +47 -0
  13. odoo/addons/helpdesk_mgmt_fieldservice/models/fsm_order.py +31 -0
  14. odoo/addons/helpdesk_mgmt_fieldservice/models/helpdesk_ticket.py +72 -0
  15. odoo/addons/helpdesk_mgmt_fieldservice/readme/CONFIGURE.md +1 -0
  16. odoo/addons/helpdesk_mgmt_fieldservice/readme/CONTRIBUTORS.md +6 -0
  17. odoo/addons/helpdesk_mgmt_fieldservice/readme/DESCRIPTION.md +2 -0
  18. odoo/addons/helpdesk_mgmt_fieldservice/readme/HISTORY.md +3 -0
  19. odoo/addons/helpdesk_mgmt_fieldservice/readme/INSTALL.md +3 -0
  20. odoo/addons/helpdesk_mgmt_fieldservice/readme/ROADMAP.md +1 -0
  21. odoo/addons/helpdesk_mgmt_fieldservice/readme/USAGE.md +6 -0
  22. odoo/addons/helpdesk_mgmt_fieldservice/security/ir.model.access.csv +3 -0
  23. odoo/addons/helpdesk_mgmt_fieldservice/static/description/icon.png +0 -0
  24. odoo/addons/helpdesk_mgmt_fieldservice/static/description/index.html +477 -0
  25. odoo/addons/helpdesk_mgmt_fieldservice/static/src/scss/helpdesk_column.scss +6 -0
  26. odoo/addons/helpdesk_mgmt_fieldservice/tests/__init__.py +1 -0
  27. odoo/addons/helpdesk_mgmt_fieldservice/tests/test_helpdesk_ticket_fsm_order.py +200 -0
  28. odoo/addons/helpdesk_mgmt_fieldservice/views/fsm_location_views.xml +19 -0
  29. odoo/addons/helpdesk_mgmt_fieldservice/views/fsm_order_views.xml +12 -0
  30. odoo/addons/helpdesk_mgmt_fieldservice/views/helpdesk_ticket_views.xml +96 -0
  31. odoo/addons/helpdesk_mgmt_fieldservice/wizards/__init__.py +4 -0
  32. odoo/addons/helpdesk_mgmt_fieldservice/wizards/fsm_order_close_wizard.py +26 -0
  33. odoo/addons/helpdesk_mgmt_fieldservice/wizards/fsm_order_close_wizard.xml +43 -0
  34. odoo_addon_helpdesk_mgmt_fieldservice-18.0.1.0.0.7.dist-info/METADATA +140 -0
  35. odoo_addon_helpdesk_mgmt_fieldservice-18.0.1.0.0.7.dist-info/RECORD +37 -0
  36. odoo_addon_helpdesk_mgmt_fieldservice-18.0.1.0.0.7.dist-info/WHEEL +5 -0
  37. odoo_addon_helpdesk_mgmt_fieldservice-18.0.1.0.0.7.dist-info/top_level.txt +1 -0
@@ -0,0 +1,477 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6
+ <title>README.rst</title>
7
+ <style type="text/css">
8
+
9
+ /*
10
+ :Author: David Goodger (goodger@python.org)
11
+ :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
12
+ :Copyright: This stylesheet has been placed in the public domain.
13
+
14
+ Default cascading style sheet for the HTML output of Docutils.
15
+ Despite the name, some widely supported CSS2 features are used.
16
+
17
+ See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
18
+ customize this style sheet.
19
+ */
20
+
21
+ /* used to remove borders from tables and images */
22
+ .borderless, table.borderless td, table.borderless th {
23
+ border: 0 }
24
+
25
+ table.borderless td, table.borderless th {
26
+ /* Override padding for "table.docutils td" with "! important".
27
+ The right padding separates the table cells. */
28
+ padding: 0 0.5em 0 0 ! important }
29
+
30
+ .first {
31
+ /* Override more specific margin styles with "! important". */
32
+ margin-top: 0 ! important }
33
+
34
+ .last, .with-subtitle {
35
+ margin-bottom: 0 ! important }
36
+
37
+ .hidden {
38
+ display: none }
39
+
40
+ .subscript {
41
+ vertical-align: sub;
42
+ font-size: smaller }
43
+
44
+ .superscript {
45
+ vertical-align: super;
46
+ font-size: smaller }
47
+
48
+ a.toc-backref {
49
+ text-decoration: none ;
50
+ color: black }
51
+
52
+ blockquote.epigraph {
53
+ margin: 2em 5em ; }
54
+
55
+ dl.docutils dd {
56
+ margin-bottom: 0.5em }
57
+
58
+ object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
59
+ overflow: hidden;
60
+ }
61
+
62
+ /* Uncomment (and remove this text!) to get bold-faced definition list terms
63
+ dl.docutils dt {
64
+ font-weight: bold }
65
+ */
66
+
67
+ div.abstract {
68
+ margin: 2em 5em }
69
+
70
+ div.abstract p.topic-title {
71
+ font-weight: bold ;
72
+ text-align: center }
73
+
74
+ div.admonition, div.attention, div.caution, div.danger, div.error,
75
+ div.hint, div.important, div.note, div.tip, div.warning {
76
+ margin: 2em ;
77
+ border: medium outset ;
78
+ padding: 1em }
79
+
80
+ div.admonition p.admonition-title, div.hint p.admonition-title,
81
+ div.important p.admonition-title, div.note p.admonition-title,
82
+ div.tip p.admonition-title {
83
+ font-weight: bold ;
84
+ font-family: sans-serif }
85
+
86
+ div.attention p.admonition-title, div.caution p.admonition-title,
87
+ div.danger p.admonition-title, div.error p.admonition-title,
88
+ div.warning p.admonition-title, .code .error {
89
+ color: red ;
90
+ font-weight: bold ;
91
+ font-family: sans-serif }
92
+
93
+ /* Uncomment (and remove this text!) to get reduced vertical space in
94
+ compound paragraphs.
95
+ div.compound .compound-first, div.compound .compound-middle {
96
+ margin-bottom: 0.5em }
97
+
98
+ div.compound .compound-last, div.compound .compound-middle {
99
+ margin-top: 0.5em }
100
+ */
101
+
102
+ div.dedication {
103
+ margin: 2em 5em ;
104
+ text-align: center ;
105
+ font-style: italic }
106
+
107
+ div.dedication p.topic-title {
108
+ font-weight: bold ;
109
+ font-style: normal }
110
+
111
+ div.figure {
112
+ margin-left: 2em ;
113
+ margin-right: 2em }
114
+
115
+ div.footer, div.header {
116
+ clear: both;
117
+ font-size: smaller }
118
+
119
+ div.line-block {
120
+ display: block ;
121
+ margin-top: 1em ;
122
+ margin-bottom: 1em }
123
+
124
+ div.line-block div.line-block {
125
+ margin-top: 0 ;
126
+ margin-bottom: 0 ;
127
+ margin-left: 1.5em }
128
+
129
+ div.sidebar {
130
+ margin: 0 0 0.5em 1em ;
131
+ border: medium outset ;
132
+ padding: 1em ;
133
+ background-color: #ffffee ;
134
+ width: 40% ;
135
+ float: right ;
136
+ clear: right }
137
+
138
+ div.sidebar p.rubric {
139
+ font-family: sans-serif ;
140
+ font-size: medium }
141
+
142
+ div.system-messages {
143
+ margin: 5em }
144
+
145
+ div.system-messages h1 {
146
+ color: red }
147
+
148
+ div.system-message {
149
+ border: medium outset ;
150
+ padding: 1em }
151
+
152
+ div.system-message p.system-message-title {
153
+ color: red ;
154
+ font-weight: bold }
155
+
156
+ div.topic {
157
+ margin: 2em }
158
+
159
+ h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
160
+ h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
161
+ margin-top: 0.4em }
162
+
163
+ h1.title {
164
+ text-align: center }
165
+
166
+ h2.subtitle {
167
+ text-align: center }
168
+
169
+ hr.docutils {
170
+ width: 75% }
171
+
172
+ img.align-left, .figure.align-left, object.align-left, table.align-left {
173
+ clear: left ;
174
+ float: left ;
175
+ margin-right: 1em }
176
+
177
+ img.align-right, .figure.align-right, object.align-right, table.align-right {
178
+ clear: right ;
179
+ float: right ;
180
+ margin-left: 1em }
181
+
182
+ img.align-center, .figure.align-center, object.align-center {
183
+ display: block;
184
+ margin-left: auto;
185
+ margin-right: auto;
186
+ }
187
+
188
+ table.align-center {
189
+ margin-left: auto;
190
+ margin-right: auto;
191
+ }
192
+
193
+ .align-left {
194
+ text-align: left }
195
+
196
+ .align-center {
197
+ clear: both ;
198
+ text-align: center }
199
+
200
+ .align-right {
201
+ text-align: right }
202
+
203
+ /* reset inner alignment in figures */
204
+ div.align-right {
205
+ text-align: inherit }
206
+
207
+ /* div.align-center * { */
208
+ /* text-align: left } */
209
+
210
+ .align-top {
211
+ vertical-align: top }
212
+
213
+ .align-middle {
214
+ vertical-align: middle }
215
+
216
+ .align-bottom {
217
+ vertical-align: bottom }
218
+
219
+ ol.simple, ul.simple {
220
+ margin-bottom: 1em }
221
+
222
+ ol.arabic {
223
+ list-style: decimal }
224
+
225
+ ol.loweralpha {
226
+ list-style: lower-alpha }
227
+
228
+ ol.upperalpha {
229
+ list-style: upper-alpha }
230
+
231
+ ol.lowerroman {
232
+ list-style: lower-roman }
233
+
234
+ ol.upperroman {
235
+ list-style: upper-roman }
236
+
237
+ p.attribution {
238
+ text-align: right ;
239
+ margin-left: 50% }
240
+
241
+ p.caption {
242
+ font-style: italic }
243
+
244
+ p.credits {
245
+ font-style: italic ;
246
+ font-size: smaller }
247
+
248
+ p.label {
249
+ white-space: nowrap }
250
+
251
+ p.rubric {
252
+ font-weight: bold ;
253
+ font-size: larger ;
254
+ color: maroon ;
255
+ text-align: center }
256
+
257
+ p.sidebar-title {
258
+ font-family: sans-serif ;
259
+ font-weight: bold ;
260
+ font-size: larger }
261
+
262
+ p.sidebar-subtitle {
263
+ font-family: sans-serif ;
264
+ font-weight: bold }
265
+
266
+ p.topic-title {
267
+ font-weight: bold }
268
+
269
+ pre.address {
270
+ margin-bottom: 0 ;
271
+ margin-top: 0 ;
272
+ font: inherit }
273
+
274
+ pre.literal-block, pre.doctest-block, pre.math, pre.code {
275
+ margin-left: 2em ;
276
+ margin-right: 2em }
277
+
278
+ pre.code .ln { color: gray; } /* line numbers */
279
+ pre.code, code { background-color: #eeeeee }
280
+ pre.code .comment, code .comment { color: #5C6576 }
281
+ pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
282
+ pre.code .literal.string, code .literal.string { color: #0C5404 }
283
+ pre.code .name.builtin, code .name.builtin { color: #352B84 }
284
+ pre.code .deleted, code .deleted { background-color: #DEB0A1}
285
+ pre.code .inserted, code .inserted { background-color: #A3D289}
286
+
287
+ span.classifier {
288
+ font-family: sans-serif ;
289
+ font-style: oblique }
290
+
291
+ span.classifier-delimiter {
292
+ font-family: sans-serif ;
293
+ font-weight: bold }
294
+
295
+ span.interpreted {
296
+ font-family: sans-serif }
297
+
298
+ span.option {
299
+ white-space: nowrap }
300
+
301
+ span.pre {
302
+ white-space: pre }
303
+
304
+ span.problematic, pre.problematic {
305
+ color: red }
306
+
307
+ span.section-subtitle {
308
+ /* font-size relative to parent (h1..h6 element) */
309
+ font-size: 80% }
310
+
311
+ table.citation {
312
+ border-left: solid 1px gray;
313
+ margin-left: 1px }
314
+
315
+ table.docinfo {
316
+ margin: 2em 4em }
317
+
318
+ table.docutils {
319
+ margin-top: 0.5em ;
320
+ margin-bottom: 0.5em }
321
+
322
+ table.footnote {
323
+ border-left: solid 1px black;
324
+ margin-left: 1px }
325
+
326
+ table.docutils td, table.docutils th,
327
+ table.docinfo td, table.docinfo th {
328
+ padding-left: 0.5em ;
329
+ padding-right: 0.5em ;
330
+ vertical-align: top }
331
+
332
+ table.docutils th.field-name, table.docinfo th.docinfo-name {
333
+ font-weight: bold ;
334
+ text-align: left ;
335
+ white-space: nowrap ;
336
+ padding-left: 0 }
337
+
338
+ /* "booktabs" style (no vertical lines) */
339
+ table.docutils.booktabs {
340
+ border: 0px;
341
+ border-top: 2px solid;
342
+ border-bottom: 2px solid;
343
+ border-collapse: collapse;
344
+ }
345
+ table.docutils.booktabs * {
346
+ border: 0px;
347
+ }
348
+ table.docutils.booktabs th {
349
+ border-bottom: thin solid;
350
+ text-align: left;
351
+ }
352
+
353
+ h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
354
+ h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
355
+ font-size: 100% }
356
+
357
+ ul.auto-toc {
358
+ list-style-type: none }
359
+
360
+ </style>
361
+ </head>
362
+ <body>
363
+ <div class="document">
364
+
365
+
366
+ <a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367
+ <img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368
+ </a>
369
+ <div class="section" id="helpdesk-mgmt-fieldservice">
370
+ <h1>Helpdesk Mgmt Fieldservice</h1>
371
+ <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372
+ !! This file is generated by oca-gen-addon-readme !!
373
+ !! changes will be overwritten. !!
374
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
+ !! source digest: sha256:aea8c039b76b6f0b0aaef81df8f0d7f045b203b2e71c4cf3ab86e94ab978b076
376
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377
+ <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/helpdesk/tree/18.0/helpdesk_mgmt_fieldservice"><img alt="OCA/helpdesk" src="https://img.shields.io/badge/github-OCA%2Fhelpdesk-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/helpdesk-18-0/helpdesk-18-0-helpdesk_mgmt_fieldservice"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/helpdesk&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378
+ <p>This module allows the helpdesk user to track the status of related
379
+ service orders.</p>
380
+ <p><strong>Table of contents</strong></p>
381
+ <div class="contents local topic" id="contents">
382
+ <ul class="simple">
383
+ <li><a class="reference internal" href="#installation" id="toc-entry-1">Installation</a></li>
384
+ <li><a class="reference internal" href="#configuration" id="toc-entry-2">Configuration</a></li>
385
+ <li><a class="reference internal" href="#usage" id="toc-entry-3">Usage</a></li>
386
+ <li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-4">Known issues / Roadmap</a></li>
387
+ <li><a class="reference internal" href="#changelog" id="toc-entry-5">Changelog</a><ul>
388
+ <li><a class="reference internal" href="#section-1" id="toc-entry-6">12.0.1.0.0 (2016-06-19)</a></li>
389
+ </ul>
390
+ </li>
391
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-7">Bug Tracker</a></li>
392
+ <li><a class="reference internal" href="#credits" id="toc-entry-8">Credits</a><ul>
393
+ <li><a class="reference internal" href="#authors" id="toc-entry-9">Authors</a></li>
394
+ <li><a class="reference internal" href="#contributors" id="toc-entry-10">Contributors</a></li>
395
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-11">Maintainers</a></li>
396
+ </ul>
397
+ </li>
398
+ </ul>
399
+ </div>
400
+ <div class="section" id="installation">
401
+ <h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
402
+ <p>To install this module, you need to:</p>
403
+ <ul class="simple">
404
+ <li>Install helpdesk_mgmt_fieldservice</li>
405
+ </ul>
406
+ </div>
407
+ <div class="section" id="configuration">
408
+ <h2><a class="toc-backref" href="#toc-entry-2">Configuration</a></h2>
409
+ <p>There is no need to do anything to configure this module</p>
410
+ </div>
411
+ <div class="section" id="usage">
412
+ <h2><a class="toc-backref" href="#toc-entry-3">Usage</a></h2>
413
+ <ul class="simple">
414
+ <li>Go to Helpdesk</li>
415
+ <li>Create or select a ticket</li>
416
+ <li>In the “Service Orders” tab, you can create service orders for the FSM
417
+ team</li>
418
+ </ul>
419
+ <p>To close a ticket, all the related service orders must be closed.</p>
420
+ </div>
421
+ <div class="section" id="known-issues-roadmap">
422
+ <h2><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h2>
423
+ </div>
424
+ <div class="section" id="changelog">
425
+ <h2><a class="toc-backref" href="#toc-entry-5">Changelog</a></h2>
426
+ <div class="section" id="section-1">
427
+ <h3><a class="toc-backref" href="#toc-entry-6">12.0.1.0.0 (2016-06-19)</a></h3>
428
+ <ul class="simple">
429
+ <li>[ADD] Add this module OCA/helpdesk project</li>
430
+ </ul>
431
+ </div>
432
+ </div>
433
+ <div class="section" id="bug-tracker">
434
+ <h2><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h2>
435
+ <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/helpdesk/issues">GitHub Issues</a>.
436
+ In case of trouble, please check there if your issue has already been reported.
437
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
438
+ <a class="reference external" href="https://github.com/OCA/helpdesk/issues/new?body=module:%20helpdesk_mgmt_fieldservice%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
439
+ <p>Do not contact contributors directly about support or help with technical issues.</p>
440
+ </div>
441
+ <div class="section" id="credits">
442
+ <h2><a class="toc-backref" href="#toc-entry-8">Credits</a></h2>
443
+ <div class="section" id="authors">
444
+ <h3><a class="toc-backref" href="#toc-entry-9">Authors</a></h3>
445
+ <ul class="simple">
446
+ <li>Open Source Integrators</li>
447
+ <li>Escodoo</li>
448
+ </ul>
449
+ </div>
450
+ <div class="section" id="contributors">
451
+ <h3><a class="toc-backref" href="#toc-entry-10">Contributors</a></h3>
452
+ <ul class="simple">
453
+ <li>Bhavesh Odedra &lt;<a class="reference external" href="mailto:bodedra&#64;opensourceintegrators.com">bodedra&#64;opensourceintegrators.com</a>&gt;</li>
454
+ <li>Open Source Integrators &lt;<a class="reference external" href="mailto:contact&#64;opensourceintegrators.com">contact&#64;opensourceintegrators.com</a>&gt;</li>
455
+ <li>Serpent Consulting Services Pvt. Ltd. &lt;<a class="reference external" href="mailto:support&#64;serpentcs.com">support&#64;serpentcs.com</a>&gt;</li>
456
+ <li>Marcel Savegnago &lt;<a class="reference external" href="mailto:marcel.savegnago&#64;escodoo.com.br">marcel.savegnago&#64;escodoo.com.br</a>&gt;</li>
457
+ <li>Italo Lopes &lt;<a class="reference external" href="mailto:italo.lopes&#64;camptocamp.com">italo.lopes&#64;camptocamp.com</a>&gt;</li>
458
+ <li>Iván Todorovich &lt;<a class="reference external" href="mailto:ivan.todorovich&#64;camptocamp.com">ivan.todorovich&#64;camptocamp.com</a>&gt;</li>
459
+ </ul>
460
+ </div>
461
+ <div class="section" id="maintainers">
462
+ <h3><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h3>
463
+ <p>This module is maintained by the OCA.</p>
464
+ <a class="reference external image-reference" href="https://odoo-community.org">
465
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
466
+ </a>
467
+ <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
468
+ mission is to support the collaborative development of Odoo features and
469
+ promote its widespread use.</p>
470
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/helpdesk/tree/18.0/helpdesk_mgmt_fieldservice">OCA/helpdesk</a> project on GitHub.</p>
471
+ <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
472
+ </div>
473
+ </div>
474
+ </div>
475
+ </div>
476
+ </body>
477
+ </html>
@@ -0,0 +1,6 @@
1
+ .helpdesk_column {
2
+ width: 100% !important;
3
+ color: white;
4
+ background-color: $o-brand-primary;
5
+ text-transform: uppercase;
6
+ }
@@ -0,0 +1 @@
1
+ from . import test_helpdesk_ticket_fsm_order
@@ -0,0 +1,200 @@
1
+ # Copyright 2022 Camptocamp SA
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3
+
4
+ from odoo.exceptions import ValidationError
5
+ from odoo.tests import Form, TransactionCase
6
+
7
+ from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
8
+
9
+
10
+ class TestHelpdeskTicketFSMOrder(TransactionCase):
11
+ @classmethod
12
+ def setUpClass(cls):
13
+ super().setUpClass()
14
+ cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
15
+ cls.partner = cls.env["res.partner"].create({"name": "Partner 1"})
16
+ cls.user_demo = cls.env.ref("base.user_demo")
17
+ cls.fsm_team = cls.env["fsm.team"].create({"name": "FSM Team"})
18
+ cls.fsm_stage_new = cls.env.ref("fieldservice.fsm_stage_new")
19
+ cls.fsm_stage_cancelled = cls.env.ref("fieldservice.fsm_stage_cancelled")
20
+ cls.stage_closed = cls.env.ref("helpdesk_mgmt.helpdesk_ticket_stage_done")
21
+ cls.stage_completed = cls.env.ref("fieldservice.fsm_stage_completed")
22
+ cls.test_location = cls.env.ref("fieldservice.test_location")
23
+ cls.partner.service_location_id = cls.test_location
24
+ cls.mail_alias_id = cls.env["mail.alias"].create(
25
+ {
26
+ "alias_name": "Test Mail Alias",
27
+ "alias_model_id": cls.env["ir.model"]
28
+ .search([("model", "=", "helpdesk.ticket")])
29
+ .id,
30
+ }
31
+ )
32
+ cls.team_id = cls.env["helpdesk.ticket.team"].create(
33
+ {"name": "Team 1", "alias_id": cls.mail_alias_id.id}
34
+ )
35
+
36
+ cls.ticket_1 = cls.env["helpdesk.ticket"].create(
37
+ {
38
+ "name": "Test 1",
39
+ "description": "Ticket test",
40
+ "user_id": cls.user_demo.id,
41
+ "team_id": cls.team_id.id,
42
+ "fsm_location_id": cls.test_location.id,
43
+ }
44
+ )
45
+ cls.ticket_2 = cls.env["helpdesk.ticket"].create(
46
+ {
47
+ "name": "Test 2",
48
+ "description": "Ticket test",
49
+ "user_id": cls.user_demo.id,
50
+ "team_id": cls.team_id.id,
51
+ "fsm_location_id": cls.test_location.id,
52
+ }
53
+ )
54
+ cls.fsm_order_no_ticket = cls.env["fsm.order"].create(
55
+ {
56
+ "name": "No ticket order",
57
+ "location_id": cls.test_location.id,
58
+ "team_id": cls.fsm_team.id,
59
+ }
60
+ )
61
+ cls.fsm_stage_closed = cls.env["fsm.stage"].create(
62
+ {
63
+ "name": "Custom Closing Stage",
64
+ "stage_type": "order",
65
+ "is_closed": True,
66
+ "sequence": 200,
67
+ }
68
+ )
69
+
70
+ @classmethod
71
+ def _create_ticket_fsm_orders(cls, ticket, number: int = 1):
72
+ action = ticket.action_create_order()
73
+ model = cls.env[action["res_model"]].with_context(**action["context"])
74
+ return model.create([{}] * number)
75
+
76
+ def test_helpdesk_ticket_fsm_order(self):
77
+ """
78
+ Checks actions related to the ticket and fieldservice
79
+ """
80
+ # checking action_create_order on fsm.order
81
+ fsm_orders = self._create_ticket_fsm_orders(self.ticket_1, 5)
82
+ self.assertRecordValues(
83
+ fsm_orders,
84
+ [
85
+ {
86
+ "ticket_id": self.ticket_1.id,
87
+ "priority": self.ticket_1.priority,
88
+ "location_id": self.test_location.id,
89
+ }
90
+ for _ in range(5)
91
+ ],
92
+ )
93
+ self.assertEqual(self.test_location.ticket_count, 2)
94
+ # checking action_view_ticket on fsm.location
95
+ action_view_ticket = self.test_location.action_view_ticket()
96
+ self.assertEqual(
97
+ action_view_ticket["context"],
98
+ {
99
+ "search_default_open": 1,
100
+ "default_fsm_location_id": self.test_location.id,
101
+ "default_partner_id": self.test_location.partner_id.id,
102
+ },
103
+ )
104
+ self.ticket_2.fsm_location_id = False
105
+ action_view_ticket = self.test_location.action_view_ticket()
106
+ self.assertEqual(action_view_ticket["views"], [(False, "form")])
107
+ self.assertEqual(action_view_ticket["res_id"], self.ticket_1.id)
108
+ # checking action_complete on fsm.order with ticket
109
+ resolution = "High resolution"
110
+ for idx, order in enumerate(fsm_orders[:-1]):
111
+ order.resolution = resolution + f" {str(idx + 1)}"
112
+ order.action_complete()
113
+ self.assertRecordValues(
114
+ fsm_orders[:-1],
115
+ [
116
+ {
117
+ "stage_id": self.stage_completed.id,
118
+ "is_button": False,
119
+ }
120
+ for _ in range(4)
121
+ ],
122
+ )
123
+ fsm_orders[-1].resolution = "Just another resolution"
124
+ action_complete_last_order = fsm_orders[-1].action_complete()
125
+ self.assertEqual(
126
+ action_complete_last_order["res_model"],
127
+ "fsm.order.close.wizard",
128
+ )
129
+ self.assertEqual(
130
+ action_complete_last_order["context"],
131
+ {
132
+ "default_ticket_id": self.ticket_1.id,
133
+ "default_team_id": self.team_id.id,
134
+ "default_resolution": "Just another resolution",
135
+ },
136
+ )
137
+ fsm_order_close_wizard = self.env["fsm.order.close.wizard"].with_context(
138
+ **action_complete_last_order["context"]
139
+ )
140
+ with Form(fsm_order_close_wizard) as wizard:
141
+ wizard.stage_id = self.stage_closed
142
+ wizard.record.action_close_ticket()
143
+ self.assertEqual(self.ticket_1.stage_id.name, self.stage_closed.name)
144
+ self.assertEqual(self.ticket_1.resolution, "Just another resolution")
145
+ # check action_complete on fsm.order no ticket
146
+ self.fsm_order_no_ticket.action_complete()
147
+ self.assertEqual(self.fsm_order_no_ticket.stage_id, self.stage_completed)
148
+ self.assertFalse(self.fsm_order_no_ticket.is_button)
149
+
150
+ def test_recompute_location_if_partner_with_default_location_is_set(self):
151
+ other_location = self.env.ref("fieldservice.location_1")
152
+ other_partner = other_location.partner_id
153
+ other_partner.service_location_id = other_location
154
+ self.ticket_1.partner_id = other_location.partner_id
155
+ self.assertEqual(self.ticket_1.fsm_location_id, other_location)
156
+
157
+ def test_recompute_location_if_commercial_partner_with_default_location_is_set(
158
+ self,
159
+ ):
160
+ other_location = self.env.ref("fieldservice.location_1")
161
+ other_partner = other_location.partner_id
162
+ other_partner.service_location_id = other_location
163
+ other_contact = self.env["res.partner"].create(
164
+ {
165
+ "name": "Other Contact",
166
+ "parent_id": other_partner.id,
167
+ }
168
+ )
169
+ self.ticket_1.partner_id = other_contact
170
+ self.assertEqual(self.ticket_1.fsm_location_id, other_location)
171
+
172
+ def test_keep_location_if_partner_without_default_location_is_set(self):
173
+ other_location = self.env.ref("fieldservice.location_1")
174
+ other_partner = other_location.partner_id
175
+ other_partner.service_location_id = False
176
+ self.ticket_1.partner_id = other_location.partner_id
177
+ self.assertEqual(self.ticket_1.fsm_location_id, self.test_location)
178
+
179
+ def test_can_close_ticket_if_no_fsm_order(self):
180
+ self.ticket_1.stage_id = self.stage_closed
181
+
182
+ def test_can_close_ticket_if_all_fsm_orders_are_closed(self):
183
+ orders = self._create_ticket_fsm_orders(self.ticket_1, 2)
184
+ orders.stage_id = self.fsm_stage_closed
185
+ self.ticket_1.stage_id = self.stage_closed
186
+
187
+ def test_can_not_close_ticket_if_none_fsm_order_is_closed(self):
188
+ self._create_ticket_fsm_orders(self.ticket_1, 2)
189
+ with self.assertRaisesRegex(
190
+ ValidationError, "Please complete all service orders"
191
+ ):
192
+ self.ticket_1.stage_id = self.stage_closed
193
+
194
+ def test_can_not_close_ticket_if_only_some_fsm_order_are_closed(self):
195
+ orders = self._create_ticket_fsm_orders(self.ticket_1, 2)
196
+ orders[0].stage_id = self.fsm_stage_closed
197
+ with self.assertRaisesRegex(
198
+ ValidationError, "Please complete all service orders"
199
+ ):
200
+ self.ticket_1.stage_id = self.stage_closed