[FIX] project_average_acceptable_time: use on_account_update hook
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.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
{
|
||||
"name": "project_average_acceptable_time",
|
||||
"version": "18.0.1.1.1",
|
||||
"version": "18.0.1.1.2",
|
||||
"author": "Elabore",
|
||||
"website": "https://git.elabore.coop/elabore/project-tools",
|
||||
"maintainer": "Clément Thomas",
|
||||
|
||||
Reference in New Issue
Block a user