diff options
| author | Victor Feyens <vfe@odoo.com> | 2020-08-12 09:32:28 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-09-01 07:18:06 +0000 |
| commit | e75086000ee4317b2ad2994db5d906fbcbd5081f (patch) | |
| tree | 54945426c1770ae46e10f99440105a288a7ec07f /addons/project | |
| parent | b0e0035b585f976e912e97e7f95f66b525bc8e43 (diff) | |
[REM] portal, *: remove archive_groups dead code
PURPOSE
Clean code and be and more performance oriented.
SPECIFICATIONS
Various portal pages hold references to archive_groups. It was a summary
of customer documents for portal, containing a count of all documents split
by model.
Currently its computation is not used. Indeed archive_groups is displayed
only in 'my_details' page that does not hold any document-based reference
or code call. Other calls to archive_groups are dead code as the result is
not used. Since 13.0 it is even not computed on standard pages to speedup
their load (as it was not used).
It is not used anymore and its computation and references can be removed
safely, especially with v14 in mind for which we want to remove dead code
to maintain.
Followup of odoo/odoo#55228
LINKS
Task ID-2329081
PR odoo/odoo#55800
PR #12368
Related: odoo/enterprise#12368
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/project')
| -rw-r--r-- | addons/project/controllers/portal.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/addons/project/controllers/portal.py b/addons/project/controllers/portal.py index f7480d3aedb..e80aaa647e2 100644 --- a/addons/project/controllers/portal.py +++ b/addons/project/controllers/portal.py @@ -47,10 +47,9 @@ class CustomerPortal(CustomerPortal): sortby = 'date' order = searchbar_sortings[sortby]['order'] - # archive groups - Default Group By 'create_date' - archive_groups = self._get_archive_groups('project.project', domain) if values.get('my_details') else [] if date_begin and date_end: domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)] + # projects count project_count = Project.search_count(domain) # pager @@ -71,7 +70,6 @@ class CustomerPortal(CustomerPortal): 'date_end': date_end, 'projects': projects, 'page_name': 'project', - 'archive_groups': archive_groups, 'default_url': '/my/projects', 'pager': pager, 'searchbar_sortings': searchbar_sortings, @@ -159,8 +157,6 @@ class CustomerPortal(CustomerPortal): if not groupby: groupby = 'project' - # archive groups - Default Group By 'create_date' - archive_groups = self._get_archive_groups('project.task', domain) if values.get('my_details') else [] if date_begin and date_end: domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)] @@ -210,7 +206,6 @@ class CustomerPortal(CustomerPortal): 'date_end': date_end, 'grouped_tasks': grouped_tasks, 'page_name': 'task', - 'archive_groups': archive_groups, 'default_url': '/my/tasks', 'pager': pager, 'searchbar_sortings': searchbar_sortings, |
