Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2271 Widoki

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

XML Code:
        <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>
Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

The original record seems to have noupdate set to 1, so that any changes will not takes place, after installing your custom module, just login the database, and navigate to Settings -> Technical -> Security -> Record rules, and open the above rule and check whether the  newly added domain get added there or not. Most probably the domain wont see there.


So to confirm the domain is fine and okay, add the domain from ui and see whether everything is okay, if it is okay, then  you can just delete the rule and upgrade your custom module once again.


Thanks

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lut 18
4397
0
gru 19
3293
2
kwi 19
4087
2
kwi 19
5715
2
lip 25
1726