Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][MIG] website_event_crm > website_event_crm_invitation: Migration to 15.0 #341

Merged
merged 11 commits into from
Sep 18, 2023
6 changes: 6 additions & 0 deletions setup/website_event_crm_invitation/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
148 changes: 148 additions & 0 deletions website_event_crm_invitation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
==================================
Website, event and CRM integration
==================================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/15.0/website_event_crm_extension
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-website_event_crm_extension
: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/web&target_branch=15.0
:alt: Try me on Runboat

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

This module extends the functionality of website events and CRM to support
inviting customers to register to events of the selected category and to allow
you to have less administrative work to do, mostly if they register by
themselves.

**Table of contents**

.. contents::
:local:

Installation
============

To install this module, you need to:

#. Install crm_event from https://github.com/OCA/event

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

This module allows you to configure opportunity stages to enable some automations.

To advance automatically to the next stage when the opportunity is invited to view an event category on the website:

#. Go to *CRM > Sales > My pipeline*.

#. Hover over one stage name and click on its cogs icon.

#. Choose *Edit Stage*.

#. Enable *Invite automatically to website event category* if you want that
opportunities in that stage, which are related to an event category, get
periodically checked to see if there's a new event published in your website,
belonging to that category, and, if so, invited to check it out.

#. Enable *Advance stage automatically when inviting to website event category*
if you want that, when one of the opportunities in that stage is invited to
check out events published on your website, it advances automatically to the
next stage.

Important: If you don't want to invite automatically on loop, make sure to
enable both options if you enable the 1st one, and make sure the next stage is
not enabled to autonotify.

To configure the frequency of automated notifications:

#. Go to *Settings > Technical > Automation > Scheduled Actions >
Notify all opportunities related to event categories*.

#. Edit *Execute Every*.

Important: That only schedules mails, but they will be sent later when the
*Mail: Email Queue Manager* automated action is triggered. You can configure it
the same way.

Usage
=====

To use this module, you need to:

#. Go to *CRM > Sales > My pipeline* and create one opportunity.

#. Assign an event type and a customer to it. The event type must:

* Have at least one published event.
* With available seats.
* Which is upcoming.

#. Click on *Invite to website*. You will see a wizard to send an email to the
customer, inviting him/her to visit your website and register to an event.

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

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

* Tecnativa

Contributors
~~~~~~~~~~~~

* Jairo Llopis <jairo.llopis@tecnativa.com> (https://www.tecnativa.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-Yajo| image:: https://github.com/Yajo.png?size=40px
:target: https://github.com/Yajo
:alt: Yajo

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

|maintainer-Yajo|

This module is part of the `OCA/web <https://github.com/OCA/web/tree/15.0/website_event_crm_extension>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions website_event_crm_invitation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizards
21 changes: 21 additions & 0 deletions website_event_crm_invitation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2021 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website, event and CRM integration",
"summary": "Invite leads to event types on website",
"version": "15.0.1.0.0",
"development_status": "Production/Stable",
"category": "Marketing",
"website": "https://github.com/OCA/event",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["Yajo"],
"license": "AGPL-3",
"installable": True,
"depends": ["crm_event", "website_event"],
"data": [
"data/ir_cron_data.xml",
"data/mail_template_data.xml",
"views/crm_lead_view.xml",
"views/crm_stage_view.xml",
],
}
14 changes: 14 additions & 0 deletions website_event_crm_invitation/data/ir_cron_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2021 Tecnativa - Jairo Llopis
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<data noupdate="1">
<record id="cron" model="ir.cron">
<field name="name">Notify all opportunities related to event categories</field>
<field name="active" eval="True" />
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="state">code</field>
<field name="model_id" ref="crm.model_crm_lead" />
<field name="code">model._cron_auto_invite_website_event_type()</field>
</record>
</data>
48 changes: 48 additions & 0 deletions website_event_crm_invitation/data/mail_template_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2021 Tecnativa - Jairo Llopis
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record id="crm_lead_event_type_tpl" model="mail.template">
<field name="name">Invite to event category</field>
<field name="auto_delete" eval="False" />
<field name="email_to">{{object.email_from or ''}}</field>
pedrobaeza marked this conversation as resolved.
Show resolved Hide resolved
<field name="partner_to">{{object.partner_id.id or ''}}</field>
<field
name="lang"
>{{object.partner_id.lang or object.env.context.get("lang") or object.env.user.lang}}</field>
<field name="model_id" ref="crm.model_crm_lead" />
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">Dear <t
t-out="object.partner_name or object.partner_id.name"
/>,</p>
<p style="margin: 0px; padding: 0px; font-size: 13px;">
You seem to be interested in registering into an event of category
<strong t-out="object.event_type_id.name" />.
</p>
<p style="margin: 0px; padding: 0px; font-size: 13px;">
I just wanted to inform you that
<b>we have currently some event(s) of that category published</b>
in our website:
</p>
<p>
<div style="margin: 16px 8px 16px 8px; text-align: center;">
<a
t-attf-href="#{ctx.get('base_url', '')}#{object.event_type_website_url}"
style="background-color: #875a7b; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;"
>
View events of category
<strong t-out="object.event_type_id.name" />
</a>
</div>
</p>
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Please visit that link and register to any event you like.
</p>
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Regards.
</p>
</div>
</field>
</record>
</odoo>
Loading