Skip to content

Commit

Permalink
[FIX] fleet: Add multi company ir.rule
Browse files Browse the repository at this point in the history
Purpose
=======
Since the new company switcher, it's now easier
to manage records of different companies.

Specification
=============
Add a multi company `ir.rule` for `fleet.vehicle`.

closes odoo#34426

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
  • Loading branch information
LucasLefevre committed Jul 1, 2019
1 parent b60b781 commit effcf0d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions addons/fleet/security/fleet_security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,11 @@
<field name="model_id" ref="model_fleet_vehicle"/>
<field name="groups" eval="[(4, ref('fleet_group_manager'))]"/>
</record>
<record id="ir_rule_fleet_vehicle" model="ir.rule">
<field name="name">Fleet vehicle: Multi Company</field>
<field name="model_id" ref="model_fleet_vehicle"/>
<field name="global" eval="True"/>
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
</record>
</data>
</odoo>

0 comments on commit effcf0d

Please sign in to comment.