AccessError related to the record rule

49 Views Asked by At

Error:

Forbidden Uh-oh! Looks like you have stumbled upon some top-secret records.

Sorry, Joe (id=16) doesn't have 'read' access to:

  • User, Joe (res.users: 16)

Blame the following rules:

If you really, really need access, perhaps you can win over your friendly administrator with a batch of freshly baked cookies.

Implicitly accessed through 'User' (res.users).

Record rule code:

'''

    <record id="res_partner_for_outbound_partners" model="ir.rule">
        <field name="name">Customer Profile for Partners</field>
        <field name="model_id" ref="base.model_res_partner"/>
        <field name="domain_force">[('id', '=', user.company_name.id)]</field>
        <field name="groups" eval="[(4, ref('users.group_outbound_partner'))]"/>
        <field name="perm_create" eval="0"/>
        <field name="perm_write" eval="0"/>
        <field name="perm_unlink" eval="0"/>
        <field name="perm_read" eval="1"/>
    </record>

'''

the above record rule is to view the customer record of logined user only , after adding this record rule if i try to login then always i'm getting this error .

Note : group_outbound_partner -> this group of users have read access to res.users

If anybody know whats the issue please comment it out

0

There are 0 best solutions below