From cd038b3dca43be626907f5b3e87889e2d9716fbf Mon Sep 17 00:00:00 2001 From: Mikheil Barnaveli Date: Wed, 29 May 2024 11:46:03 +0400 Subject: [PATCH] [15.0][MIG] document_page_portal: Migration to 15.0 file fix --- document_page_portal/controllers/portal.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/document_page_portal/controllers/portal.py b/document_page_portal/controllers/portal.py index 37a2bc7e..07da1248 100644 --- a/document_page_portal/controllers/portal.py +++ b/document_page_portal/controllers/portal.py @@ -1,6 +1,3 @@ -# Copyright (C) 2020 - TODAY, Marcel Savegnago - Escodoo). -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - from odoo import http from odoo.exceptions import AccessError, MissingError from odoo.http import request @@ -9,6 +6,7 @@ from odoo.tools.translate import _ from odoo.addons.portal.controllers.portal import CustomerPortal, pager as portal_pager + class CustomerPortal(CustomerPortal): def _prepare_portal_layout_values(self): values = super(CustomerPortal, self)._prepare_portal_layout_values() @@ -72,7 +70,7 @@ class CustomerPortal(CustomerPortal): # archive groups - Default Group By 'create_date' archive_groups = request.env["document.page"].read_group( - domain, ['create_date:month'], ['create_date:month'] + domain, ["create_date"], groupby=["create_date:month"] ) if date_begin and date_end: domain += [ @@ -112,7 +110,7 @@ class CustomerPortal(CustomerPortal): "date": date_begin, "document_pages": document_pages, "page_name": "document_page", - "default_url": "/my/knowledge/documents", + "default_url": "/my/knowledge/s", "pager": pager, "archive_groups": archive_groups, "searchbar_sortings": searchbar_sortings,