Add project_home_action addon for Project login landing

Restores Home Action on user Preferences (removed in Odoo 19) and
defaults internal users to project.open_view_project_all on install
and create, so login opens Projects instead of Discuss.

Co-authored-by: dyaco8464 <dyaco8464@yahoo.com>
This commit is contained in:
Cursor Agent
2026-08-26 09:28:48 +00:00
parent 2a9598f03e
commit 7776b7f10d
6 changed files with 85 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
def post_init_hook(env):
"""Set Home Action to Projects for internal users that have none."""
action = env.ref("project.open_view_project_all", raise_if_not_found=False)
if not action:
return
users = env["res.users"].search(
[
("share", "=", False),
("action_id", "=", False),
]
)
if users:
users.write({"action_id": action.id})