diff --git a/addons/account/controllers/portal.py b/addons/account/controllers/portal.py
index 8723334ffcd..9766b27c276 100644
--- a/addons/account/controllers/portal.py
+++ b/addons/account/controllers/portal.py
@@ -58,7 +58,6 @@ class PortalAccount(CustomerPortal):
filterby = 'all'
domain += searchbar_filters[filterby]['domain']
- archive_groups = self._get_archive_groups('account.move', domain) if values.get('my_details') else []
if date_begin and date_end:
domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)]
@@ -81,7 +80,6 @@ class PortalAccount(CustomerPortal):
'invoices': invoices,
'page_name': 'invoice',
'pager': pager,
- 'archive_groups': archive_groups,
'default_url': '/my/invoices',
'searchbar_sortings': searchbar_sortings,
'sortby': sortby,
diff --git a/addons/portal/controllers/portal.py b/addons/portal/controllers/portal.py
index c2c7901030b..548b72ef8e4 100644
--- a/addons/portal/controllers/portal.py
+++ b/addons/portal/controllers/portal.py
@@ -123,25 +123,6 @@ class CustomerPortal(Controller):
_items_per_page = 20
- def _get_archive_groups(self, model, domain=None, fields=None, groupby="create_date", order="create_date desc"):
- if not model:
- return []
- if domain is None:
- domain = []
- if fields is None:
- fields = ['name', 'create_date']
- groups = []
- for group in request.env[model]._read_group_raw(domain, fields=fields, groupby=groupby, orderby=order):
- dates, label = group[groupby]
- date_begin, date_end = dates.split('/')
- groups.append({
- 'date_begin': odoo_fields.Date.to_string(odoo_fields.Date.from_string(date_begin)),
- 'date_end': odoo_fields.Date.to_string(odoo_fields.Date.from_string(date_end)),
- 'name': label,
- 'item_count': group[groupby + '_count']
- })
- return groups
-
def _prepare_portal_layout_values(self):
"""Values for /my/* templates rendering.
@@ -156,7 +137,6 @@ class CustomerPortal(Controller):
return {
'sales_user': sales_user,
'page_name': 'home',
- 'archive_groups': [],
}
def _prepare_home_portal_values(self, counters):
diff --git a/addons/portal/views/portal_templates.xml b/addons/portal/views/portal_templates.xml
index 9ad2efaf9fb..75827fe8ac9 100644
--- a/addons/portal/views/portal_templates.xml
+++ b/addons/portal/views/portal_templates.xml
@@ -132,9 +132,6 @@
Edit Security Settings
-
-
-
@@ -351,24 +348,6 @@
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
Contact Details
diff --git a/addons/project/controllers/portal.py b/addons/project/controllers/portal.py
index d701862b730..43147037d2b 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,
diff --git a/addons/purchase/controllers/portal.py b/addons/purchase/controllers/portal.py
index ddecdf1cefb..8a264c19188 100644
--- a/addons/purchase/controllers/portal.py
+++ b/addons/purchase/controllers/portal.py
@@ -44,7 +44,6 @@ class CustomerPortal(CustomerPortal):
domain = []
- archive_groups = self._get_archive_groups('purchase.order', domain) if values.get('my_details') else []
if date_begin and date_end:
domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)]
@@ -93,7 +92,6 @@ class CustomerPortal(CustomerPortal):
'orders': orders,
'page_name': 'purchase',
'pager': pager,
- 'archive_groups': archive_groups,
'searchbar_sortings': searchbar_sortings,
'sortby': sortby,
'searchbar_filters': OrderedDict(sorted(searchbar_filters.items())),
diff --git a/addons/sale/controllers/portal.py b/addons/sale/controllers/portal.py
index 969de29735d..a9c9fe94550 100644
--- a/addons/sale/controllers/portal.py
+++ b/addons/sale/controllers/portal.py
@@ -58,7 +58,6 @@ class CustomerPortal(CustomerPortal):
sortby = 'date'
sort_order = searchbar_sortings[sortby]['order']
- archive_groups = self._get_archive_groups('sale.order', domain) if values.get('my_details') else []
if date_begin and date_end:
domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)]
@@ -81,7 +80,6 @@ class CustomerPortal(CustomerPortal):
'quotations': quotations.sudo(),
'page_name': 'quote',
'pager': pager,
- 'archive_groups': archive_groups,
'default_url': '/my/quotes',
'searchbar_sortings': searchbar_sortings,
'sortby': sortby,
@@ -109,7 +107,6 @@ class CustomerPortal(CustomerPortal):
sortby = 'date'
sort_order = searchbar_sortings[sortby]['order']
- archive_groups = self._get_archive_groups('sale.order', domain) if values.get('my_details') else []
if date_begin and date_end:
domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)]
@@ -123,7 +120,7 @@ class CustomerPortal(CustomerPortal):
page=page,
step=self._items_per_page
)
- # content according to pager and archive selected
+ # content according to pager
orders = SaleOrder.search(domain, order=sort_order, limit=self._items_per_page, offset=pager['offset'])
request.session['my_orders_history'] = orders.ids[:100]
@@ -132,7 +129,6 @@ class CustomerPortal(CustomerPortal):
'orders': orders.sudo(),
'page_name': 'order',
'pager': pager,
- 'archive_groups': archive_groups,
'default_url': '/my/orders',
'searchbar_sortings': searchbar_sortings,
'sortby': sortby,
diff --git a/addons/website_crm_partner_assign/controllers/main.py b/addons/website_crm_partner_assign/controllers/main.py
index d01ad9efa02..30223855dcf 100644
--- a/addons/website_crm_partner_assign/controllers/main.py
+++ b/addons/website_crm_partner_assign/controllers/main.py
@@ -57,10 +57,9 @@ class WebsiteAccount(CustomerPortal):
sortby = 'date'
order = searchbar_sortings[sortby]['order']
- # archive groups - Default Group By 'create_date'
- archive_groups = self._get_archive_groups('crm.lead', domain) if values.get('my_details') else []
if date_begin and date_end:
domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)]
+
# pager
lead_count = CrmLead.search_count(domain)
pager = request.website.pager(
@@ -77,7 +76,6 @@ class WebsiteAccount(CustomerPortal):
'date': date_begin,
'leads': leads,
'page_name': 'lead',
- 'archive_groups': archive_groups,
'default_url': '/my/leads',
'pager': pager,
'searchbar_sortings': searchbar_sortings,
@@ -123,8 +121,6 @@ class WebsiteAccount(CustomerPortal):
if filterby == 'lost':
CrmLead = CrmLead.with_context(active_test=False)
- # archive groups - Default Group By 'create_date'
- archive_groups = self._get_archive_groups('crm.lead', domain) if values.get('my_details') else []
if date_begin and date_end:
domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)]
# pager
@@ -136,14 +132,13 @@ class WebsiteAccount(CustomerPortal):
page=page,
step=self._items_per_page
)
- # content according to pager and archive selected
+ # content according to pager
opportunities = CrmLead.search(domain, order=order, limit=self._items_per_page, offset=pager['offset'])
values.update({
'date': date_begin,
'opportunities': opportunities,
'page_name': 'opportunity',
- 'archive_groups': archive_groups,
'default_url': '/my/opportunities',
'pager': pager,
'searchbar_sortings': searchbar_sortings,