Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 159 additions & 0 deletions website_event_custom_registration/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=================================
Website Event Custom Registration
=================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:606fc643f798562a7407fd35e50661c5d3714df63c648b1850bf06c94369aff8
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fevent-lightgray.png?logo=github
:target: https://github.com/OCA/event/tree/19.0/website_event_custom_registration
:alt: OCA/event
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/event-19-0/event-19-0-website_event_custom_registration
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/event&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module lets each website event choose how attendees register,
beyond Odoo's native ticketing, through a single ``Registration Mode``
selection:

- **Native ticketing**: Odoo's standard tickets and registration flow
(default, unchanged behaviour).
- **Free / No registration**: no tickets; a custom rich-text message is
shown in the registration block instead.
- **External registration**: a button redirects attendees to a foreign
ticket portal in a new tab.

The three behaviours are combined into one Selection field to avoid the
UI state clashes and XPath conflicts that separate modules would create.

When an event is *free* or *external*, the native "Sold Out" /
"Registrations Closed" labels and the navbar register link are
suppressed while registrations are open, so the page never looks broken
just because no native ticket is configured. Once registrations close
(the event has ended, is sold out or was cancelled), Odoo's standard
"Registrations Closed" notice takes over by default; a per-event **Keep
Custom Text When Closed** toggle keeps the custom message or button
visible instead.

When a non-native mode is selected, the backend event form also locks
the native seat limit read-only and hides the registration statistics
and attendees smart buttons, since no native registrations are
collected.

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure an event:

1. Go to *Events* and open (or create) an event.
2. In the **Registration** group, choose a **Registration Mode**:

- **Native ticketing**: configure tickets as usual in the *Tickets*
tab.
- **Free / No registration**: fill in the **Free Event Message**
shown to visitors.
- **External registration**: fill in the **External Ticket URL** and,
optionally, the **External Button Text** (defaults to
``Get Tickets``).

3. For *free* and *external* events, optionally enable **Keep Custom
Text When Closed** to keep the custom message or button visible after
registrations close (past, sold-out or cancelled event), instead of
Odoo's standard "Registrations Closed" notice.
4. Save and publish the event.

Usage
=====

On the public event page, the registration block adapts to the selected
mode:

- **Native ticketing**: the standard *Register* button and ticket modal.
- **Free / No registration**: the configured message, with no ticket
controls and no "Sold Out" / "Closed" labels.
- **External registration**: a *Get Tickets* button linking to the
external portal, opening in a new tab.

Once registrations close (the event has ended, is sold out or was
cancelled), free and external events show Odoo's standard "Registrations
Closed" notice like native ones, unless **Keep Custom Text When Closed**
is enabled on the event — then the custom message or button stays
visible.

The routing applies everywhere the core registration block is rendered:
the event page's main call to action, the (desktop and mobile) sidebar,
and the event sub-menu, so the experience stays consistent across the
site.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/event/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/event/issues/new?body=module:%20website_event_custom_registration%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Riccardo Fiore

Contributors
------------

- Riccardo Fiore (Odrakir) <odrakirmusic@gmail.com>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-odrakirmusic| image:: https://github.com/odrakirmusic.png?size=40px
:target: https://github.com/odrakirmusic
:alt: odrakirmusic

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-odrakirmusic|

This module is part of the `OCA/event <https://github.com/OCA/event/tree/19.0/website_event_custom_registration>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions website_event_custom_registration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions website_event_custom_registration/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2026 Riccardo Fiore
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Event Custom Registration",
"summary": "Choose free, native or external ticketing per website event",
"version": "19.0.1.0.0",
"category": "Marketing/Events",
"author": "Riccardo Fiore, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/event",
"license": "AGPL-3",
"development_status": "Beta",
"maintainers": ["odrakirmusic"],
"depends": ["website_event"],
"data": [
"views/event_event_views.xml",
"views/website_event_templates.xml",
],
"installable": True,
"application": False,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_event_custom_registration
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 19.0-20260609\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-06-21 15:14+0000\n"
"PO-Revision-Date: 2026-06-21 15:14+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: website_event_custom_registration
#: model:ir.model.fields,help:website_event_custom_registration.field_event_event__external_ticket_url
msgid ""
"Address of the external ticketing portal attendees are sent to when the "
"registration mode is 'External registration'."
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields,field_description:website_event_custom_registration.field_event_event__display_name
msgid "Display Name"
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model,name:website_event_custom_registration.model_event_event
msgid "Event"
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields,field_description:website_event_custom_registration.field_event_event__external_button_text
msgid "External Button Text"
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields,field_description:website_event_custom_registration.field_event_event__external_ticket_url
msgid "External Ticket URL"
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields.selection,name:website_event_custom_registration.selection__event_event__registration_mode__external
msgid "External registration"
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields.selection,name:website_event_custom_registration.selection__event_event__registration_mode__free
msgid "Free / No registration"
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields,field_description:website_event_custom_registration.field_event_event__free_event_text
msgid "Free Event Message"
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields,help:website_event_custom_registration.field_event_event__registration_mode
msgid ""
"How attendees register for this event on the website:\n"
"- Native ticketing: use Odoo's built-in tickets and registration.\n"
"- Free / No registration: show a custom message instead of tickets.\n"
"- External registration: redirect attendees to a foreign ticket portal."
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields,field_description:website_event_custom_registration.field_event_event__id
msgid "ID"
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields,field_description:website_event_custom_registration.field_event_event__keep_custom_text_when_closed
msgid "Keep Custom Text When Closed"
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields,help:website_event_custom_registration.field_event_event__external_button_text
msgid "Label of the button that links to the external ticketing portal."
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields,help:website_event_custom_registration.field_event_event__free_event_text
msgid ""
"Message displayed on the event page when the registration mode is 'Free / No"
" registration'."
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields.selection,name:website_event_custom_registration.selection__event_event__registration_mode__native
msgid "Native ticketing"
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields,help:website_event_custom_registration.field_event_event__keep_custom_text_when_closed
msgid ""
"Once registrations close (the event has ended, is sold out or was "
"cancelled), Odoo normally shows its standard 'Registrations Closed' notice."
" Enable this to keep showing this event's custom content instead: the free "
"event message or the external ticket button."
msgstr ""

#. module: website_event_custom_registration
#: model_terms:ir.ui.view,arch_db:website_event_custom_registration.view_event_form
msgid "Registration"
msgstr ""

#. module: website_event_custom_registration
#: model:ir.model.fields,field_description:website_event_custom_registration.field_event_event__registration_mode
msgid "Registration Mode"
msgstr ""

#. module: website_event_custom_registration
#: model_terms:ir.ui.view,arch_db:website_event_custom_registration.view_event_form
msgid "e.g. Free entry — just show up on the night."
msgstr ""

#. module: website_event_custom_registration
#: model_terms:ir.ui.view,arch_db:website_event_custom_registration.view_event_form
msgid "https://tickets.example.com/my-event"
msgstr ""
1 change: 1 addition & 0 deletions website_event_custom_registration/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import event_event
49 changes: 49 additions & 0 deletions website_event_custom_registration/models/event_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2026 Riccardo Fiore
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models


class EventEvent(models.Model):
_inherit = "event.event"

registration_mode = fields.Selection(
selection=[
("native", "Native ticketing"),
("free", "Free / No registration"),
("external", "External registration"),
],
default="native",
required=True,
help=(
"How attendees register for this event on the website:\n"
"- Native ticketing: use Odoo's built-in tickets and registration.\n"
"- Free / No registration: show a custom message instead of tickets.\n"
"- External registration: redirect attendees to a foreign ticket "
"portal."
),
)
free_event_text = fields.Html(
string="Free Event Message",
translate=True,
sanitize_attributes=True,
help="Message displayed on the event page when the registration mode "
"is 'Free / No registration'.",
)
external_ticket_url = fields.Char(
string="External Ticket URL",
help="Address of the external ticketing portal attendees are sent to "
"when the registration mode is 'External registration'.",
)
external_button_text = fields.Char(
translate=True,
default="Get Tickets",
help="Label of the button that links to the external ticketing portal.",
)
keep_custom_text_when_closed = fields.Boolean(
default=False,
help="Once registrations close (the event has ended, is sold out or "
"was cancelled), Odoo normally shows its standard 'Registrations "
"Closed' notice. Enable this to keep showing this event's custom "
"content instead: the free event message or the external ticket "
"button.",
)
3 changes: 3 additions & 0 deletions website_event_custom_registration/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
15 changes: 15 additions & 0 deletions website_event_custom_registration/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
To configure an event:

1. Go to *Events* and open (or create) an event.
2. In the **Registration** group, choose a **Registration Mode**:
- **Native ticketing**: configure tickets as usual in the *Tickets*
tab.
- **Free / No registration**: fill in the **Free Event Message** shown
to visitors.
- **External registration**: fill in the **External Ticket URL** and,
optionally, the **External Button Text** (defaults to `Get Tickets`).
3. For *free* and *external* events, optionally enable **Keep Custom Text
When Closed** to keep the custom message or button visible after
registrations close (past, sold-out or cancelled event), instead of
Odoo's standard "Registrations Closed" notice.
4. Save and publish the event.
1 change: 1 addition & 0 deletions website_event_custom_registration/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Riccardo Fiore (Odrakir) \<odrakirmusic@gmail.com\>
Loading
Loading