I have 2 models like these:
class Category(models.Model): _name = 'mymodel.category' name = fields.Char('Name', required=True, translate=True) ... other fields ... class Item(models.Model): _name = 'mymodel.item' name = fields.Char('Name', required=True, translate=True) category_id = fields.Many2one('mymodel.category', string='Category', required=True)
There are some rules on model Category.
The problem is that I want to show the records in model Item in tree view only if the user can see their category (defined as category_id in the model)
It works for Tree View, but in Form View if user change the ID parameter in URL, he can view every item