This question has been flagged

Hi,

I have a custom field in customer form where in it shows which product variant should be visible to which customer.

Now i add product variant in the customer form in my custom M2M field. The record rule doesn't work.

I have to make the record rule inactive than save it, after than i again edit this and make it active.

Now it works fine.

Can anyone help me on this.

Avatar
Discard

I have the exact same problem, Have you found a solution, It also works if I restart the server

Best Answer

Hello,

You can try this solution. Override ResPartner Write method and clear cache.

@api.multi def write(self, vals):

   seld.clear_caches()

   return Super(ResPartner,self).write(vals)

Whenever we create Record rules for M2m field and we update that field we need to clear cache.

I hope it help you.


Avatar
Discard