In a multi company setup I need to filter data by selected company. I sadly don't know how to do this with the search view because it cannot use "user". With access rules it throws the AccessError document res.partner operation create.
My access rule for res.partner: [('company_id', 'in', [user.company_id.id])].
How to change it so that the contacts will be filtered and one can create a record. And a contact can be created if I disable the access rule, so the user has required permissions.
Which version of Odoo?
Odoo 10. Did not write it because I tagged it.