add portal_event_registration

This commit is contained in:
Luis 2026-05-04 11:47:25 +02:00
parent 18fd73ed1b
commit de0520d5a8
9 changed files with 393 additions and 0 deletions

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Allow portal users to read events where they have a registration -->
<record id="event_registration_portal_rule" model="ir.rule">
<field name="name">Event Registration: portal users see own registrations</field>
<field name="model_id" ref="event.model_event_registration"/>
<field name="domain_force">
[('partner_id', 'child_of', [user.commercial_partner_id.id])]
</field>
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
</record>
<!-- Allow portal users to read events where they are registered -->
<record id="event_event_portal_rule" model="ir.rule">
<field name="name">Event Event: portal users see events with own registrations</field>
<field name="model_id" ref="event.model_event_event"/>
<field name="domain_force">
[('registration_ids.partner_id', 'child_of', [user.commercial_partner_id.id])]
</field>
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
</record>
</odoo>