diff --git a/website_event_attendee_signup/README.rst b/website_event_attendee_signup/README.rst
new file mode 100644
index 0000000..96de35f
--- /dev/null
+++ b/website_event_attendee_signup/README.rst
@@ -0,0 +1,107 @@
+========================
+Auto Sign Up Event guest
+========================
+
+..
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! This file is generated by oca-gen-addon-readme !!
+ !! changes will be overwritten. !!
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! source digest: sha256:ee8a36cdc3d6f01ada622878d60a5ac3e171ad22a1a0dc5181539a91b812f3d3
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+.. |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-it--projects--llc%2Fwebsite--addons-lightgray.png?logo=github
+ :target: https://github.com/it-projects-llc/website-addons/tree/17.0/website_event_attendee_signup
+ :alt: it-projects-llc/website-addons
+
+|badge1| |badge2| |badge3|
+
+The modules creates ``res.user`` from every ``event.registration``
+(*attendee*) and calls ``signup_prepare()`` method to allow to send an
+email with signup url to access the portal.
+
+The modules adds email template ``Event: Signup``, which can be used
+directly or as an example to modify other email template.
+
+**Table of contents**
+
+.. contents::
+ :local:
+
+Configuration
+=============
+
+- At ``Events`` menu create or select existing event
+
+- Switch **[x] Signup attendees to portal** on
+
+- Switch **[x] Create Partners in registration** on
+
+- At ``Email Schedule`` add a line:
+
+ - **Email to Send**: *Event: Signup*
+ - **Unit**: *Immediately*
+ - **When to Run**: *After each registration*
+
+Alternative email template configuration:
+
+- Activate Developer Mode
+- Open menu ``[[ Settings ]] >> Technical >> Email >> Templates``
+- Filter out records by keyword *Event*
+- Open *Event: Signup* record
+- Click ``[Edit]``
+- Click icon ``>`` to switch to Code view
+- Copy the code related to signup
+- Go back to templates
+- Open *Event: Reminder* record
+- Click ``[Edit]``
+- Click icon ``>`` to switch to Code view
+- Paste the copied code
+- Click ``[Save]``
+
+Usage
+=====
+
+- Register few attendees to the Event via Website (``/event`` page)
+- Confirm the registrations (e.g. via backend)
+- RESULT: every attendees receives email with a link to signup to
+ portal
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues
+
+ You was registered as attendee of ${object.event_id.name}.
+
+ % if object.attendee_partner_id.signup_token:
+ Use the link below to sing-up on portal to access your event dashboard:
+
+
+Best regards,
+ + ]]> + + diff --git a/website_event_attendee_signup/i18n/website_event_attendee_signup.pot b/website_event_attendee_signup/i18n/website_event_attendee_signup.pot new file mode 100644 index 0000000..db605ba --- /dev/null +++ b/website_event_attendee_signup/i18n/website_event_attendee_signup.pot @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_event_attendee_signup +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \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_attendee_signup +#: model:mail.template,body_html:website_event_attendee_signup.email_template_signup +msgid "\n" +" \n" +"\n"
+" Hello ${object.attendee_partner_id.name},
\n"
+"\n"
+" You was registered as attendee of ${object.event_id.name}.\n"
+"\n"
+" % if object.attendee_partner_id.signup_token:\n"
+" Use the link below to sing-up on portal to access your event dashboard:\n"
+"
\n" +"
\n" +"Best regards,
\n" +" \n" +" " +msgstr "" + +#. module: website_event_attendee_signup +#: model:ir.model,name:website_event_attendee_signup.model_event_registration +msgid "Attendee" +msgstr "" + +#. module: website_event_attendee_signup +#: model:ir.model,name:website_event_attendee_signup.model_event_event +msgid "Event" +msgstr "" + +#. module: website_event_attendee_signup +#: model:ir.model.fields,help:website_event_attendee_signup.field_event_event_attendee_signup +msgid "Every attendee receives email to confirm email and set password to access to portal" +msgstr "" + +#. module: website_event_attendee_signup +#: model:ir.model.fields,field_description:website_event_attendee_signup.field_event_event_attendee_signup +msgid "Signup attendees to portal" +msgstr "" + +#. module: website_event_attendee_signup +#: model:mail.template,subject:website_event_attendee_signup.email_template_signup +msgid "Welcome to our Portal!" +msgstr "" + diff --git a/website_event_attendee_signup/images/banner.jpg b/website_event_attendee_signup/images/banner.jpg new file mode 100644 index 0000000..24b12f3 Binary files /dev/null and b/website_event_attendee_signup/images/banner.jpg differ diff --git a/website_event_attendee_signup/models/__init__.py b/website_event_attendee_signup/models/__init__.py new file mode 100644 index 0000000..f2c2a7e --- /dev/null +++ b/website_event_attendee_signup/models/__init__.py @@ -0,0 +1,2 @@ +from . import event_event +from . import event_registration diff --git a/website_event_attendee_signup/models/event_event.py b/website_event_attendee_signup/models/event_event.py new file mode 100644 index 0000000..f7e9d82 --- /dev/null +++ b/website_event_attendee_signup/models/event_event.py @@ -0,0 +1,11 @@ +from odoo import fields, models + + +class EventEvent(models.Model): + _inherit = "event.event" + + attendee_signup = fields.Boolean( + string="Signup attendees to portal", + help="Every attendee receives email to confirm email and set password to access to portal", # noqa: E501 + default=False, + ) diff --git a/website_event_attendee_signup/models/event_registration.py b/website_event_attendee_signup/models/event_registration.py new file mode 100644 index 0000000..8a47950 --- /dev/null +++ b/website_event_attendee_signup/models/event_registration.py @@ -0,0 +1,24 @@ +from odoo import api, models + + +class EventRegistration(models.Model): + _inherit = "event.registration" + + @api.model + def create(self, vals): + res = super().create(vals) + + if res.event_id.attendee_signup and res.attendee_partner_id: + login = res.attendee_partner_id.email + user = self.env["res.users"].search([("login", "=ilike", login)]) + if not user: + user = ( + self.env["res.users"] + .sudo() + ._signup_create_user( + {"login": login, "partner_id": res.attendee_partner_id.id} + ) + ) + user.partner_id.signup_prepare() + + return res diff --git a/website_event_attendee_signup/pyproject.toml b/website_event_attendee_signup/pyproject.toml new file mode 100644 index 0000000..4231d0c --- /dev/null +++ b/website_event_attendee_signup/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/website_event_attendee_signup/readme/CONFIGURE.md b/website_event_attendee_signup/readme/CONFIGURE.md new file mode 100644 index 0000000..1339516 --- /dev/null +++ b/website_event_attendee_signup/readme/CONFIGURE.md @@ -0,0 +1,24 @@ +* At `Events` menu create or select existing event +* Switch **[x] Signup attendees to portal** on +* Switch **[x] Create Partners in registration** on +* At `Email Schedule` add a line: + + - **Email to Send**: *Event: Signup* + - **Unit**: *Immediately* + - **When to Run**: *After each registration* + +Alternative email template configuration: + +* Activate Developer Mode +* Open menu `[[ Settings ]] >> Technical >> Email >> Templates` +* Filter out records by keyword *Event* +* Open *Event: Signup* record +* Click `[Edit]` +* Click icon `>` to switch to Code view +* Copy the code related to signup +* Go back to templates +* Open *Event: Reminder* record +* Click `[Edit]` +* Click icon `>` to switch to Code view +* Paste the copied code +* Click `[Save]` diff --git a/website_event_attendee_signup/readme/CONTRIBUTORS.md b/website_event_attendee_signup/readme/CONTRIBUTORS.md new file mode 100644 index 0000000..2a8fd8d --- /dev/null +++ b/website_event_attendee_signup/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- Ivan Yelizariev (https://github.com/yelizariev) +- Artem Rafailov (https://github.com/Ommo73) +- Eugene Molotov (https://github.com/em230418) +- Victor Bykov (https://github.com/BykovVik) diff --git a/website_event_attendee_signup/readme/DESCRIPTION.md b/website_event_attendee_signup/readme/DESCRIPTION.md new file mode 100644 index 0000000..3bd7f56 --- /dev/null +++ b/website_event_attendee_signup/readme/DESCRIPTION.md @@ -0,0 +1,4 @@ +The modules creates `res.user` from every `event.registration` (*attendee*) +and calls `signup_prepare()` method to allow to send an email with signup url to access the portal. + +The modules adds email template `Event: Signup`, which can be used directly or as an example to modify other email template. diff --git a/website_event_attendee_signup/readme/USAGE.md b/website_event_attendee_signup/readme/USAGE.md new file mode 100644 index 0000000..5785d7e --- /dev/null +++ b/website_event_attendee_signup/readme/USAGE.md @@ -0,0 +1,3 @@ +* Register few attendees to the Event via Website (`/event` page) +* Confirm the registrations (e.g. via backend) +* RESULT: every attendees receives email with a link to signup to portal diff --git a/website_event_attendee_signup/static/description/events-custom-fields-10.png b/website_event_attendee_signup/static/description/events-custom-fields-10.png new file mode 100644 index 0000000..3318fed Binary files /dev/null and b/website_event_attendee_signup/static/description/events-custom-fields-10.png differ diff --git a/website_event_attendee_signup/static/description/events-custom-fields-101.png b/website_event_attendee_signup/static/description/events-custom-fields-101.png new file mode 100644 index 0000000..d56d6b3 Binary files /dev/null and b/website_event_attendee_signup/static/description/events-custom-fields-101.png differ diff --git a/website_event_attendee_signup/static/description/icon.png b/website_event_attendee_signup/static/description/icon.png new file mode 100644 index 0000000..5d32362 Binary files /dev/null and b/website_event_attendee_signup/static/description/icon.png differ diff --git a/website_event_attendee_signup/static/description/index.html b/website_event_attendee_signup/static/description/index.html new file mode 100644 index 0000000..0b4d2ab --- /dev/null +++ b/website_event_attendee_signup/static/description/index.html @@ -0,0 +1,117 @@ ++ The modules creates User from every Event registration and sends an email with signup url to access the portal. +
++ Register few attendees to the Event via Website +
++ Every person will receive the email to continue signup process. +
+For a live demostration click LIVE PREVIEW button above (near to Add to Cart)
+Contact us by email or fill out request form
+