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

Hello. Please can anyone review this record rule code:

<record model="ir.rule" id="partner_view_rule_salesperson">
<field name="name">Sales Person View Rule</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]" />
<field name="domain_force">[('user_id', '=', user.id)]</field>
</record>

It seems like the odoo system just ignore this record rule that just define. From the looks of it, there is nothing wrong with the code and it even update my module without any error, I even saw it in the list of other record rule. But why the salesman can still see contacts that are not assigned to them? Can anyone help me with this.? Any help will be much highly appreciated.

Awatar
Odrzuć

There are other record rules from base and I think those would be conflicting with your rule.

Autor

I suspecting that would be highly likely the case. So I need to find that record rule that conflicting mine and modify it, but there is a high change that I might break some of the record rules. Anyways, thank you very much for the information brother Sudhir Arya, Very much appreciated.

Najlepsza odpowiedź

As per Sudhir's comment, you will have another Record Rule that is granting access. 

  • Global Record Rules (no group specified) limit access

  • Group-specific rules (for one or more access groups) grant access and a user can be given access through multiple groups and multiple rules

More information: Record Rules


 

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
cze 23
4186
1
cze 22
6057
0
mar 15
4320
4
lip 25
800
8
lut 24
14624