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

2 Commits

Author SHA1 Message Date
Stéphan Sainléger
533e12d376 [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
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.
2026-11-09 00:33:08 +01:00
Stéphan Sainléger
82971af4d4 [FIX] project_average_acceptable_time: use Odoo 18 optional fields API
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.
2026-11-09 00:21:02 +01:00