i try to filter odoo records by users allowed companies using ir.actions.act_window domain field
<record id="account.res_partner_action_supplier" model="ir.actions.act_window">
<field name="name">Vendor Payables Report</field>
<field name="res_model">res.partner</field>
<field name="view_mode">list,form,kanban,graph,pivot</field>
<!-- Show only vendors/suppliers -->
<field name="domain">['|',
('supplier_rank','>',0),
('company_id', 'in', user.company_ids.ids)
]
</field>
<field name="context">{'search_default_supplier': 1,'res_partner_search_mode': 'supplier', 'default_is_company': True, 'default_supplier_rank': 1}</field>
</record>
but when use user it is returing error that says
EvalError: Can not evaluate python expression: (['|', ('supplier_rank','>',0), ('company_id', 'in', user.company_ids.ids) ] ) Error: Name 'user' is not defined EvalError: Can not evaluate python expression: (['|', ('supplier_rank','>',0), ('company_id', 'in', user.company_ids.ids) ] ) Error: Name 'user' is not defined at evaluateExpr (http://127.0.0.1:8070/web/assets/69487ca/web.assets_web.min.js:3344:54) at _preprocessAction (http://127.0.0.1:8070/web/assets/69487ca/web.assets_web.min.js:9983:137) at Object.doAction (http://127.0.0.1:8070/web/assets/69487ca/web.assets_web.min.js:10076:170) at async Object.selectMenu (http://127.0.0.1:8070/web/assets/69487ca/web.assets_web.min.js:10276:1)
In any case, company_ids.ids would be a list [] already, no need to wrap it in another list. Then, in your view you use uid, but you're posing an error message about using user in a domain. Where's that one coming from? Seems like there is a sentence missing before 'but [...]'...