Hello everyone,
I have a model with a company_id field, I want to create a filter like this:
string="My publications" name="my_pub" domain="[('company_id', 'in', user.own_companies)]"/>
where own_companies is a field I added in res.users:
own_companies = fields.Many2many('res.company')
and I can't do this using security rules because I still have to see the other companies in the website, so I thought the only way is to do it using filters.
The error I got trying this 'incorrect' solution is:
Invalid composed field user.own_companies in domain of ([('company_id', 'in', user.own_companies)])
in the other hand, there is 'uid' which is the id of the current connected user which helped me filter my own records in another model, how can I create such a variable/field ... which points to the connected user own companies?
Thank you in advance