Changing permissions for menus on the fly

If you need to change permissions for the menus on the fly, take into consideration that you would need to reset the cache after that action:

self.env['ir.ui.menu'].clear_caches()

Otherwise, you will not get the result that you want.

Share the knowledge!

Leave a Reply

Your email address will not be published. Required fields are marked *