[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.
This commit is contained in:
Richard Mathot
2017-07-07 12:43:57 +02:00
parent b8ca0c6985
commit bf32940142
@@ -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