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 @@ - -