[FIX] sale: access error when confirming SO if you are not admin
Use sudo to access config parameters. Previously it was an ir values but now we have to access a config parameter as superuser.
This commit is contained in:
committed by
Thibault Delavallée
parent
e518f618bb
commit
dee87e106a
@@ -499,7 +499,7 @@ class SaleOrder(models.Model):
|
||||
if self.env.context.get('send_email'):
|
||||
self.force_quotation_send()
|
||||
order.order_line._action_procurement_create()
|
||||
if self.env['ir.config_parameter'].get_param('sale.auto_done_setting'):
|
||||
if self.env['ir.config_parameter'].sudo().get_param('sale.auto_done_setting'):
|
||||
self.action_done()
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user