Files
project-tools/project_average_acceptable_time/__manifest__.py
Stéphan Sainléger dbb5711ae9
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m23s
tests / test (pull_request) Successful in 2m39s
[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.
2026-11-10 22:57:57 +01:00

33 lines
1.1 KiB
Python

# Copyright 2022 Stéphan Sainléger (Elabore)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "project_average_acceptable_time",
"version": "18.0.1.1.2",
"author": "Elabore",
"website": "https://git.elabore.coop/elabore/project-tools",
"maintainer": "Clément Thomas",
"license": "AGPL-3",
"category": "Tools",
"summary": "Task validation without customer agreement",
# any module necessary for this one to work correctly
"depends": ["base", "project", "project_user_default_project"],
"qweb": [
# "static/src/xml/*.xml",
],
"external_dependencies": {
"python": [],
},
# always loaded
"data": ["views/project_project.xml", "views/portal_home_template.xml"],
# only loaded in demonstration mode
"demo": [],
"js": [],
"css": [],
"installable": True,
# Install this module automatically if all dependency have been previously
# and independently installed. Used for synergetic or glue modules.
"auto_install": False,
"application": False,
}