[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user