From 32178b3e8fe3756516ed047d97d47b7e60f55726 Mon Sep 17 00:00:00 2001 From: antonio Date: Wed, 7 Feb 2024 18:47:29 +0100 Subject: [PATCH] Module membership_section: - Fix inconsistent compute_sudo warning --- membership_section/models/membership_section.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/membership_section/models/membership_section.py b/membership_section/models/membership_section.py index 9032b7c..d636d3b 100644 --- a/membership_section/models/membership_section.py +++ b/membership_section/models/membership_section.py @@ -10,9 +10,9 @@ class MembershipSection(models.Model): "membership.section.membership", "section_id" ) partner_ids = fields.Many2many( - "res.partner", string="Contacts", compute="_compute_partner_ids" + "res.partner", string="Contacts", compute="_compute_partner_ids", compute_sudo=True, ) - partner_ids_count = fields.Integer("# of Members", compute="_compute_partner_ids") + partner_ids_count = fields.Integer("# of Members", compute="_compute_partner_ids", compute_sudo=True) @api.depends("section_membership_ids", "section_membership_ids.partner_id") def _compute_partner_ids(self):