From e770505177d927adf0ec395852c8a808fa5ad277 Mon Sep 17 00:00:00 2001 From: ahiexp Date: Wed, 4 Jun 2025 22:12:22 +0400 Subject: [PATCH] [SOLVED] issue in permissions --- odex25_donation/ensan_sale_management/models/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odex25_donation/ensan_sale_management/models/product.py b/odex25_donation/ensan_sale_management/models/product.py index ae81df28c..1b9879c1b 100644 --- a/odex25_donation/ensan_sale_management/models/product.py +++ b/odex25_donation/ensan_sale_management/models/product.py @@ -181,7 +181,7 @@ class ProductTemplate_Inherit(models.Model): # ('move_id.move_type', '=', 'out_invoice'), ('move_id.payment_state', '=', 'paid'), # ('product_id.product_tmpl_id', '=', rec.id) # ]) - all_invoices_paid = self.env['account.move.line'].search( + all_invoices_paid = self.env['account.move.line'].sudo().search( [ ('move_id.move_type', '=', 'out_invoice'), ('move_id.payment_state', '=', 'paid'), ('product_id.product_tmpl_id', '=', rec.id)