create kpi history as sudo

pull/409/head
Jordi Ballester Alomar 2019-01-01 22:55:03 +01:00 committed by flachica
parent 488d85eb90
commit a9a03359a0
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ class KPI(models.Model):
for obj in self:
history_vals = obj._get_kpi_value()
history_obj = self.env['kpi.history']
history_obj.create(history_vals)
history_obj.sudo().create(history_vals)
return True
@api.multi