mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-26 18:38:41 -06:00
[15.0][MIG] document_page_portal: Migration to 15.0 file fix
This commit is contained in:
parent
79398e1a0f
commit
cd038b3dca
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user