In the fleet module, it has this code.
XML Code:<data noupdate="1">
<record id="fleet_rule_vehicle_visibility_manager" model="ir.rule">
<field name="name">Manager has all rights on vehicle</field>
<field name="model_id" ref="model_fleet_vehicle"/>
<field name="groups" eval="[(4, ref('fleet_group_manager'))]"/>
</record>
</data>
I added this and it doesn't work
<record id="fleet.fleet_rule_vehicle_visibility_manager" model="ir.rule">
<field name="domain_force">[('company_id.id','=',user.company_id.id)]</field>
</record>
<record id="fleet.fleet_group_manager" model="res.groups">
<field name="users" eval="[(4, ref('base.group_user'))]"/>
</record>