Hello,
How invalidate_all() is supposed to be used ? In V11 CE, I am trying to call :
self.env.invalidate_all()
in write overload. It causes this error :
AttributeError: 'Environment' object has no attribute 'invalidate_all'
Thanks for any information.
Edit :
found another way to solve my problem. Record rules based on many2many relationship were not applied when many2many fields values were modified.
This override solved my problem, don't know if I'm doing right :
@api.multi
def write(self, vals):
ret = super(MyModel, self).write(vals)
if 'my_many2many_field' in vals:
self.env['ir.rule'].clear_caches()
return ret