diff --git a/spp_audit_config/data/audit_rule_data.xml b/spp_audit_config/data/audit_rule_data.xml
index 0c261b57..93f1193a 100644
--- a/spp_audit_config/data/audit_rule_data.xml
+++ b/spp_audit_config/data/audit_rule_data.xml
@@ -4,7 +4,7 @@
Program Rule
g2p.program
-
+
@@ -18,21 +18,30 @@
Registry Rule
res.partner
-
+
Service Point Rule
spp.service.point
-
+
Default Eligibility Manager Rule
g2p.program_membership.manager.default
-
+
Program Rule
program_id
@@ -62,7 +71,10 @@
Program Manager Rule
g2p.program.manager.default
-
+
Program Rule
program_id
@@ -72,7 +84,10 @@
Cycle Manager Rule
g2p.cycle.manager.default
-
+
Program Rule
program_id
@@ -112,7 +127,10 @@
Basket Entitlement Manager Rule
g2p.program.entitlement.manager.basket
-
+
Program Rule
program_id
diff --git a/spp_audit_config/models/spp_audit_rule.py b/spp_audit_config/models/spp_audit_rule.py
index d3b3dcca..71852aa8 100644
--- a/spp_audit_config/models/spp_audit_rule.py
+++ b/spp_audit_config/models/spp_audit_rule.py
@@ -19,8 +19,6 @@ def create_rules(
**kwargs
):
rule = self.env["spp.audit.rule"].search([("name", "=", rule_name)], limit=1)
- if rule:
- return
model_id = self.env["ir.model"].search([("model", "=", model)])
if model_id:
@@ -62,6 +60,9 @@ def create_rules(
}
)
- self.env["spp.audit.rule"].create(vals)
+ if rule:
+ rule.write(vals)
+ else:
+ self.env["spp.audit.rule"].create(vals)
return