Hello. I have an ERP instance with several companies.
I wan't to set a default view filter for my custom module which will show only records from current users company.
For example a user should view only records where company_id is equal to his company. It is possible to do this?
I have tried to use something like this, but it isn't working.
filter string="My Company" name="my company" domain="[('company_id','==',[user.company_id.id])]" />
Try this one. [('company_id','child_of',[user.company_id.id])]
also try this ['|','|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False)]
have you define comapny_id (many2one) field in your custom object?