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 03bcedb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions project_wbs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,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
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
3 changes: 2 additions & 1 deletion project_wbs/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -382,6 +381,8 @@ <h1 class="title">Project Work Breakdown Structure</h1>
<li>The complete WBS path name is shown in the analytic account and in the
project</li>
<li>The WBS paths are concatenated with each other</li>
<li>Project Manager is propagated to the hierarchy, the Manager is Manager
for the WBS element only</li>
</ul>
<p>Searching and Browsing WBS</p>
<ul class="simple">
Expand Down

0 comments on commit 03bcedb

Please sign in to comment.