18.0-project-average-acceptable-time-portal-fix #36

Merged
stephansainleger merged 2 commits from 18.0-project-average-acceptable-time-portal-fix into 18.0 2026-11-09 15:48:09 +00:00
Fix pour le ticket https://elabore.coop/odoo/my-helpdesk-tickets/1252
stephansainleger added 2 commits 2026-11-09 09:58:07 +00:00
Odoo 18 replaced the ``OPTIONAL_BILLING_FIELDS`` class attribute with the
``_get_optional_fields()`` method. The portal controller still appended to
the removed attribute, raising ``AttributeError`` on every request to
``/my/account`` and making the page unavailable to all portal users.

Override ``_get_optional_fields()`` instead, as ``elabore_subscription_price``
already does, and add HTTP tests covering the page load and the default
project update on form submission.
[REF] project_average_acceptable_time: read posted value once
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m30s
tests / test (pull_request) Successful in 2m0s
533e12d376
The portal override looked the custom field up twice, once with ``get()``
for the condition and once with ``[]`` for the assignment. Read it once so
the code stays safe if the input is absent from the submitted form.
mondot approved these changes 2026-11-09 14:16:59 +00:00
stephansainleger merged commit 533e12d376 into 18.0 2026-11-09 15:48:09 +00:00
stephansainleger deleted branch 18.0-project-average-acceptable-time-portal-fix 2026-11-09 15:48:09 +00:00
Sign in to join this conversation.
No description provided.