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
98 changes: 98 additions & 0 deletions website_event_no_registration/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
===============================
Website Event - No registration
===============================

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

.. |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/licence-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%2Fwebsite-lightgray.png?logo=github
:target: https://github.com/OCA/website/tree/18.0/website_event_no_registration
:alt: OCA/website
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/website-18-0/website-18-0-website_event_no_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/website&target_branch=18.0
:alt: Try me on Runboat

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

This module extends the ``website_event`` Odoo module to provide an
extra option on the model ``event.event``, to disable registrations.
Such features is interesting if we want to display on the websites,
event organized by third parties. In that case, registrations are
managed in other websites.

|event_form|

As a result, the button to register is hidden in the website event form
view.

|website_event|

.. |event_form| image:: https://raw.githubusercontent.com/OCA/website/18.0/website_event_no_registration/static/description/event_form.png
.. |website_event| image:: https://raw.githubusercontent.com/OCA/website/18.0/website_event_no_registration/static/description/website_event.png

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/website/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/website/issues/new?body=module:%20website_event_no_registration%0Aversion:%2018.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
-------

* GRAP

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

- Sylvain LE GAL

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-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
:target: https://github.com/legalsylvain
:alt: legalsylvain

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

|maintainer-legalsylvain|

This module is part of the `OCA/website <https://github.com/OCA/website/tree/18.0/website_event_no_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_no_registration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions website_event_no_registration/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2026 - Today: GRAP https://www.grap.coop
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Website Event - No registration",
"summary": "Add option to prevent registration of event"
" organized by third party.",
"version": "18.0.1.0.0",
"author": "GRAP, Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
"website": "https://github.com/OCA/website",
"license": "AGPL-3",
"category": "Website",
"depends": ["website_event"],
"data": [
"views/view_event_event.xml",
"views/event_templates.xml",
"views/view_event_type.xml",
],
}
26 changes: 26 additions & 0 deletions website_event_no_registration/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_event_no_registration
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-10-05 23:40+0000\n"
"PO-Revision-Date: 2026-10-05 23:40+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_no_registration
#: model:ir.model,name:website_event_no_registration.model_event_event
msgid "Event"
msgstr "Événement"

#. module: website_event_no_registration
#: model:ir.model.fields,field_description:website_event_no_registration.field_event_event__registration_allowed
msgid "Registration Allowed"
msgstr "Réservation possible"
2 changes: 2 additions & 0 deletions website_event_no_registration/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import event_type
from . import event_event
38 changes: 38 additions & 0 deletions website_event_no_registration/models/event_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2026 - Today: GRAP https://www.grap.coop
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from odoo import api, fields, models


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

registration_allowed = fields.Boolean(
copy=True, compute="_compute_registration_allowed", readonly=False, store=True
)

@api.depends("event_type_id")
def _compute_registration_allowed(self):
for event in self:
if not event.event_type_id:
event.registration_allowed = True
else:
event.registration_allowed = event.event_type_id.registration_allowed

@api.depends(
"date_tz",
"event_registrations_started",
"date_end",
"seats_available",
"seats_limited",
"seats_max",
"event_ticket_ids.sale_available",
"registration_allowed",
)
def _compute_event_registrations_open(self):
res = super(
EventEvent, self.filtered(lambda x: x.registration_allowed)
)._compute_event_registrations_open()
for event in self.filtered(lambda x: not x.registration_allowed):
event.event_registrations_open = False
return res
10 changes: 10 additions & 0 deletions website_event_no_registration/models/event_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2026 - Today: GRAP https://www.grap.coop
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from odoo import fields, models


class EventType(models.Model):
_inherit = "event.type"

registration_allowed = fields.Boolean(default=True)
3 changes: 3 additions & 0 deletions website_event_no_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"
1 change: 1 addition & 0 deletions website_event_no_registration/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Sylvain LE GAL
10 changes: 10 additions & 0 deletions website_event_no_registration/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This module extends the ``website_event`` Odoo module to provide an extra option
on the model ``event.event``, to disable registrations.
Such features is interesting if we want to display on the websites, event organized
by third parties. In that case, registrations are managed in other websites.

![event_form](../static/description/event_form.png)

As a result, the button to register is hidden in the website event form view.

![website_event](../static/description/website_event.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading