Commit Graph

44 Commits

Author SHA1 Message Date
Stéphan Sainléger
923a4f16c4 [IMP] helpdesk_user_default_ticket_team: document behaviour and convert README to markdown
- Add docstrings to ``_compute_user_id``, ``create`` and
  ``_define_user_id`` and clarify the inline comments describing the
  team-leader fallback rules.
- Convert ``README.rst`` to ``README.md``, documenting usage, the
  graceful handling of partners without a linked user, and how to run
  the test suite.
2026-06-25 15:39:54 +02:00
Stéphan Sainléger
b58fb77f3a [ADD] helpdesk_user_default_ticket_team: add test coverage
Add a ``TransactionCase`` test suite covering the module behaviour:

- ``_define_user_id`` decision rules (no team, no current user, user not
  in team, user in team, team without leader).
- ``create`` auto-assignment (with/without partner, with/without default
  team, explicit team not overridden, partner without linked user, batch
  ``vals_list`` creation).
- ``_compute_user_id`` recomputation on team change.
- Full portal creation flow (team + project + user) and presence of the
  ``default_helpdesk_ticket_team_id`` field on ``res.users``.
2026-06-25 15:39:30 +02:00
Stéphan Sainléger
6b8906325e [FIX] helpdesk_user_default_ticket_team: handle partner without linked user
``create`` accessed ``partner.user_ids[0]`` which raised ``IndexError``
when the ticket's partner had no linked user (e.g. a plain contact).

Use ``partner.user_ids[:1]`` so a partner without a user yields an empty
recordset, which the following ``if not user`` guard handles gracefully,
leaving the ticket's team untouched.
2026-06-25 15:39:23 +02:00
Stéphan Sainléger
1bfe51109e [REF] helpdesk_user_default_ticket_team: extract user assignment into `_define_user_id`
Extract the team-leader assignment logic into a dedicated
``_define_user_id`` helper, shared between ``_compute_user_id`` and
``create``:

- ``_compute_user_id`` now delegates to ``_define_user_id`` instead of
  inlining the membership/leader checks.
- ``create`` also assigns ``user_id`` from the default team via the same
  helper, so a portal-created ticket gets the team leader assigned.

This centralises the decision (keep current user / fall back to team
leader) in a single, reusable place.
2026-06-25 15:39:12 +02:00
Stéphan Sainléger
9ed3774820 [FIX] helpdesk_portal_ticket_priority_form: fix the portal ticket list column diplay of priority
the previous code was not working when list is grouped by stage or
category.
The new code set an XPATH based on a fixed tag.
2026-06-25 10:57:24 +02:00
Stéphan Sainléger
a2b2256a17 [IMP] helpdesk_user_default_ticket_team: auto-assign team leader on team change
In helpdesk_mgmt v16, ``_compute_user_id`` automatically filled
``user_id`` with ``team_id.alias_user_id`` when the team was set and
no user was assigned. This behaviour was removed in v18: the compute
now only clears ``user_id`` when the assigned user is not a member of
the selected team, without assigning anyone in its place.

This commit restores equivalent behaviour using ``team_id.user_id``
(the Team Leader field) instead of ``alias_user_id``:

- When ``team_id`` changes and the current ``user_id`` is not a member
  of the new team, the Team Leader is assigned automatically.
- If the team has no leader configured, ``user_id`` is left unchanged
  to avoid creating unassigned tickets.
- ``super()`` is not called: this is a full replacement of the v18
  OCA behaviour, not an extension of it.

Also updates README.rst to document the new auto-assignment behaviour.
2026-06-12 16:29:33 +02:00
Stéphan Sainléger
8aeb08ce14 [MIG] helpdesk_timesheet_exclude_from_sale_order: migrate to 18.0 2026-03-17 21:48:12 +01:00
Stéphan Sainléger
bf91f01387 [MIG] helpdesk_transfer_timesheet_to_task: migrate to 18.0 2026-03-17 21:45:49 +01:00
Stéphan Sainléger
48185f0124 [MIG] helpdesk_convert_ticket_to_task: migrate to 18.0 2026-03-17 21:41:37 +01:00
Stéphan Sainléger
baf64eac45 [MIG] helpdesk_user_default_ticket_team: migrate to 18.0 2026-03-17 21:31:15 +01:00
Stéphan Sainléger
5d152e096f [MIG] helpdesk_ticket_task_domain: migrate to 18.0 2026-03-17 21:23:49 +01:00
Stéphan Sainléger
3697b246f1 [MIG] helpdesk_portal_timesheet: migrate to 18.0 2026-03-17 21:23:49 +01:00
Stéphan Sainléger
b61f34f700 [NEW] helpdesk_portal_ticket_list_defaults: create add-on
this add-on comes from add-on helpdesk_portal_ticket_custom in v16.0
which has been refactorized.
2026-03-17 21:23:49 +01:00
Stéphan Sainléger
c8b37a22e5 [MIG] helpdesk_portal_ticket_priority_form: migrate to 18.0 2026-03-17 21:23:49 +01:00
Stéphan Sainléger
c067fcf28f [MIG] helpdesk_portal_ticket_enriched_description_form: migrate to 18.0 2026-03-17 21:23:49 +01:00
Stéphan Sainléger
a6943e96be [MIG] helpdesk_request_type: migrate to 18.0 2026-03-17 15:07:14 +01:00
Stéphan Sainléger
0720f67a14 [MIG] init 18.0 2026-01-16 16:25:10 +01:00
243603069e [ADD] helpdesk_ticket_task_domain 2025-10-21 15:18:26 +00:00
jscampucci
5df89b06cd [IMP] helpdesk_portal_ticket_custom: add default filter & group to portal ticket list
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m33s
2025-10-21 08:34:12 +00:00
jscampucci
72faa3929a [IMP] helpdesk_portal_timesheet : correct sum from non billable timesheet from portal 2025-10-21 08:28:38 +00:00
jscampucci
b837c6b3c7 [IMP] helpdesk_portal_ticket_custom: add priority to portal ticket view
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m28s
2025-10-21 08:13:36 +00:00
jscampucci
cb83dd954c [ADD] helpdesk_portal_ticket_custom: add priority to portal ticket list 2025-10-21 08:13:36 +00:00
801a4cb7f2 Sync config from odoo-elabore-ci:16.0
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 7m42s
2025-09-17 13:40:07 +00:00
jscampucci
6814938949 [IMP] helpdesk_portal_timesheet : hide non billable timesheet from portal 2025-09-08 09:38:14 +02:00
jscampucci
070193bea1 [CLN] lint commit 2025-09-08 09:38:14 +02:00
63bb355444 [IMP] helpdesk_convert_ticket_to_task: correct translations 2025-08-04 17:31:11 +02:00
e04595b65d [I18N]helpdesk_portal_ticket_enriched_description_form 2025-07-16 16:31:30 +02:00
2bbe59a7c1 [I18N]helpdesk_request_type 2025-07-16 16:31:30 +02:00
Boris Gallet
217cafe0e5 [ADD]helpdesk_timesheet_exclude_from_sale_order 2025-07-15 14:31:10 +02:00
63af539ba6 [REM] helpdesk_create_task_from_ticket: replaced by helpdesk_convert_task_to_ticket 2025-07-10 15:49:38 +02:00
a6da3de63a [ADD] helpdesk_convert_ticket_to_task: add new button in ticket to convert into task with many informations 2025-07-09 12:27:40 +02:00
63a2c8f28f [ADD]helpdesk_portal_timesheet 2025-07-08 14:13:04 +02:00
Stéphan Sainléger
25da7f6a8f [IMP] helpdesk_user_default_ticket_team: fill project field
if defined in the helpdesk team
2025-06-03 09:24:56 +02:00
Stéphan Sainléger
5f74000f5c [ADD] helpdesk_user_default_ticket_team: create add-on 2025-06-03 09:24:56 +02:00
Quentin Mondot
28ae6f5572 [NEW] helpdesk_transfer_timesheet_to_task: assign the timesheets ticket to the linked task 2025-04-08 15:39:19 +02:00
Quentin Mondot
57c5815324 [FIX] helpdesk_create_task_from_ticket: debug when used with timesheet module 2025-03-10 17:34:05 +01:00
Quentin Mondot
1fc28287d9 [IMP] helpdesk_create_task_from_ticket: retrieve task service and request type based on ticket category and request type names 2025-02-25 10:06:28 +01:00
Quentin Mondot
72a848477e [ADD] helpdesk_create_task_from_ticket: this module enriches task information when creating it from a ticket form 2025-02-25 10:06:28 +01:00
Quentin Mondot
e2c3737b90 [FIX] helpdesk_request_type: corrected bug on attachments in new ticket form
The param "max_upload_size" was missing when rendering "helpdesk_mgmt.portal_create_ticket".
Instead of added it, I've overloaded the response from helpdesk_mgmt create_new_ticket
2025-02-25 10:06:28 +01:00
Stéphan Sainléger
f84a88c106 [MIG] helpdesk_portal_ticket_priority_form: migrate to 16.0 2024-12-16 08:57:05 +01:00
Stéphan Sainléger
241f37d509 [MIG] helpdesk_portal_ticket_enriched_description_form: migrate to 16.0 2024-12-16 08:56:50 +01:00
Stéphan Sainléger
9abab43c87 [MIG] helpdesk_request_type: migrate to 16.0 2024-10-02 23:31:55 +02:00
Stéphan Sainléger
842eeb0e47 [NEW] helpdesk_request_type: create add-ons 2024-10-02 23:10:45 +02:00
Stéphan Sainléger
e612d8370e Initial commit 2024-10-02 18:20:11 +02:00