In official documentation, we have the following example for computed fields :
total = fields.Float(compute='_compute_total')
@api.depends('value', 'tax')
def _compute_total(self):
for record in self:
record.total = record.value + record.value * record.tax
On the guidelines, we can read :
Be aware that this assignation will trigger a write into the database. If you need to do bulk change or must be careful about performance, you should do classic call to write
My question is how can we do the bulk change ? Is it valid to add the decorator @api.multi over the compute function and do something like self.write() ?