From ecf5eded6b2923c38e0c1858243821018db79612 Mon Sep 17 00:00:00 2001 From: benjamin <benjamin@le-filament.com> Date: Mon, 3 Oct 2022 14:58:04 +0200 Subject: [PATCH] [update] set RO access for scop_contribution view --- report/scop_contribution_report.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/report/scop_contribution_report.py b/report/scop_contribution_report.py index 0e06a3c..2240a52 100644 --- a/report/scop_contribution_report.py +++ b/report/scop_contribution_report.py @@ -1,10 +1,14 @@ # © 2022 Le Filament (<http://www.le-filament.com>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +import logging + from psycopg2.extensions import AsIs from odoo import api, fields, models, tools +_logger = logging.getLogger(__name__) + class ScopContributionReport(models.Model): _name = "scop.contribution.report" @@ -146,6 +150,7 @@ class ScopContributionReport(models.Model): "CREATE or REPLACE VIEW %s as (%s)", (AsIs(self._table), AsIs(self._query())), ) + self._set_ro_table() # ------------------------------------------------------ # Computed fields -- GitLab