From bf32940142beb879211b7034bb77a7845c9d0555 Mon Sep 17 00:00:00 2001 From: Richard Mathot Date: Fri, 7 Jul 2017 12:43:57 +0200 Subject: [PATCH] [FIX] sale: non-admin users may not have read access on ir_config_parameters Before this commit, this line prevented users to open their sales orders. --- addons/sale/wizard/sale_make_invoice_advance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index 0e146fd7c72..8fe7dc11f33 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -27,7 +27,7 @@ class SaleAdvancePaymentInv(models.TransientModel): @api.model def _default_product_id(self): - product_id = self.env['ir.config_parameter'].get_param('sale.default_deposit_product_id') + product_id = self.env['ir.config_parameter'].sudo().get_param('sale.default_deposit_product_id') return self.env['product.product'].browse(product_id) @api.model