[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:
Jérome Maes
2017-09-08 13:57:37 +02:00
committed by Thibault Delavallée
parent e518f618bb
commit dee87e106a
+1 -1
View File
@@ -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