This question has been flagged
Is there any way using which i can achieve  the following result ???​

Current Situation : 

Rule 1 (which is written in base) is apply for res_partner even if i defined the new Rule 2 in custom module.

In Rule 1 domain defined that show all customers but in Rule 2 i defined that show only particular customers based on new domain then it'll not consider the Rule 2 domain why ?

If i deactivate Rule 1 then Rule 2 works fine which i want but override or manually deactivate the particular rule is not a desirable solution for that.

Is there any way using which i can set the record rules priority ???


Avatar
Discard
Best Answer

Global Records Rules (no group specified) are restrictive and block access

Group Record Rules limit access for the members of the group, but if there are multiple Record Rules then users are granted access from ALL the Record Rules (from all the groups they are in).

So if the first Record Rule grants a user access to all customers that can't be taken away by having another Record Rule that limits them to specific customers.  

You'd have to ensure that either:

  • These users are not member of the group that is authorized to all customers

  • OR change that Record Rule to be more restrictive and create another Record Rule that grants fuller access - and create a new group for the users that need the fuller access.

Avatar
Discard
Author Best Answer

Hello Anu,

Actually i don't want to override the existing rule because each time when my custom module install at that time i don't know which module is already installed (base module) and because of which rule will not affect my rule that i don't know that's why. 

Avatar
Discard
Best Answer

  Hi,

   Please try this https://stackoverflow.com/questions/53030606/inherit-and-replace-ir-rule-odoo-11                                           

Avatar
Discard