Skip to content

Commit

Permalink
[FIX] project_wbs: Manager consistency between project and analytic a…
Browse files Browse the repository at this point in the history
…ccount
  • Loading branch information
AaronHForgeFlow committed May 3, 2024
1 parent d380127 commit 8b60bf8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions project_wbs/models/project_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,11 @@ def write(self, vals):
if "active" in vals and vals["active"]:
for project in self.filtered(lambda p: not p.analytic_account_id.active):
project.analytic_account_id.active = True
if "user_id" in vals:
for account in self.env["account.analytic.account"].browse(
self.analytic_account_id.get_child_accounts().keys()
):
account.user_id = vals["user_id"]

Check warning on line 300 in project_wbs/models/project_project.py

View check run for this annotation

Codecov / codecov/patch

project_wbs/models/project_project.py#L300

Added line #L300 was not covered by tests
return res

def action_open_parent_kanban_view(self):
Expand Down
2 changes: 2 additions & 0 deletions project_wbs/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Adding WBS information to Odoo Projects
* The complete WBS path name is shown in the analytic account and in the
project
* The WBS paths are concatenated with each other
* Project Manager is propagated to the hierarchy, the Manager is Manager
for the WBS element only

Searching and Browsing WBS

Expand Down

0 comments on commit 8b60bf8

Please sign in to comment.