9 Commits

Author SHA1 Message Date
Stéphan Sainléger
dbb5711ae9 [FIX] project_average_acceptable_time: use on_account_update hook
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m23s
tests / test (pull_request) Successful in 2m39s
The portal override validated the submitted data a second time after
``super().account()`` returned. When the partner cannot edit its VAT (child
contact or issued invoices), the country select is disabled and not
submitted; Odoo core injects the missing ``country_id`` in its own copy of
the posted data, but the raw payload re-validated by the module still
lacked it, raising ``KeyError: 'country_id'`` and a 500 on save.

Move the default-project update to ``on_account_update()``, which Odoo
calls after a successful validation, and drop the duplicate validation.
Add a regression test with a child contact whose country field is disabled.
2026-11-10 22:57:57 +01:00
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
11d82988d1 [IMP]project_average_acceptable_time:fix page crash when the portal user is follower of any project 2026-08-10 16:07:28 +02:00
Stéphan Sainléger
0bd8da68cd [MIG] project_average_acceptable_time: migrate to 18.0 2026-06-04 11:56:12 +02:00
Stéphan Sainléger
27c7904e28 [MIG] init 18.0 2026-01-20 15:24:30 +01:00
Boris Gallet
2cd17ce8ef [MIG] project_average_acceptable_time : migration to 16.0 2023-11-02 15:10:49 +01:00
clementthomas
77b26fd755 [IMP] project_average_acceptable_time: migration to v14 2023-07-24 12:17:43 +02:00
clementthomas
34dfc13936 [ADD] project_average_acceptable_time 2023-04-19 14:54:11 +02:00