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

[16.0][MIG] partner_event: Migration to version 16.0 #345

Merged
merged 27 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6c424b0
[ADD] partner event addon
antespi Aug 24, 2015
6651d96
Slovene translations added
sysadminmatmoz Oct 12, 2015
d28b615
Auto create partners in event registrations
Nov 3, 2015
00acbf1
Do not store registration counts.
yajo Jun 16, 2016
83ec513
Propagate partner changes and show errors when registering partners (…
antespi Nov 11, 2016
a67229c
[MIG] partner_event: Migration to 9.0
cubells Nov 12, 2016
04100ee
[MIG] partner_event: Migration to 10.0
chienandalu May 29, 2017
b0ede65
[10.0][IMP] partner_event: Set attendee partner
sergio-teruel Nov 9, 2017
acb9450
[IMP] partner_event: Do single browse
yajo Nov 14, 2017
c6ee741
[IMP] partner_event: forbid partner deletion (#94)
chienandalu Nov 22, 2017
35ab033
[MIG] partner_event: Migration to 11.0
HviorForgeFlow May 10, 2018
79f22d1
[IMP] partner_event: catch onchange with attendee_partner (#1)
chienandalu May 15, 2018
e541c90
[MIG]partner_event:Migrated the module from v11 to v12
AnilKesariya Oct 2, 2018
88e57e3
[IMP] partner_event: README by fragments
pedrobaeza Mar 4, 2019
cda7f95
Translated using Weblate (Spanish)
Aug 20, 2019
51b2dde
[FIX] partner_event: Proper development status
pedrobaeza Aug 22, 2019
81d886a
[IMP] partner_event: add data to old registrations
chienandalu Oct 8, 2019
acb743f
[IMP] partner_event: black, isort, prettier
victoralmau Sep 7, 2020
80799e7
[MIG] partner_event: Migration to 13.0
victoralmau Sep 8, 2020
4e2bb39
[MIG] partner_event : Migration to 14.0
chandni300 Feb 17, 2021
496b572
Added translation using Weblate (Swedish)
simonstromb Nov 16, 2021
65d02c2
[FIX] partner_event: ondelete cascade for wizard
pedrobaeza Feb 28, 2022
db671e9
[MIG] partner_event: Migration to 15.0
stefan-tecnativa Jan 25, 2023
a884ed7
[IMP] partner_event: Do registration creation in batch + remove savep…
pedrobaeza Aug 30, 2023
5ea6b46
[FIX] partner_event: compatibility with event_sale
chienandalu Sep 19, 2023
5196a4e
[IMP] partner_event: pre-commit stuff
carolinafernandez-tecnativa Oct 5, 2023
4410baa
[MIG] partner_event: Migration to 16.0
carolinafernandez-tecnativa Oct 5, 2023
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
112 changes: 112 additions & 0 deletions partner_event/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
======================
Link partner to events
======================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fevent-lightgray.png?logo=github
:target: https://github.com/OCA/event/tree/15.0/partner_event
:alt: OCA/event
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/event-15-0/event-15-0-partner_event
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/199/15.0
:alt: Try me on Runbot

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

This module links partners with the events they are registered through a
smart button.

It also includes:

* Search partners by their event attendees.
* Search partners by number of events attendees.
* Search partners by number of events attended.
* Partner column is visible on registration one2many list inside the event.
* Action in partner tree view 'More' button, to register several partners
to an event
* Restricts partner deletion when event attendees are linked to it.

**Table of contents**

.. contents::
:local:

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

There is a new option in event form view, "Create Partners in registration". If
this option is checked, when you add registrations to this event, partners will
be created automatically with name, email, phone and mobile fields.

If partner already exists and user only fills email, name, phone and mobile fields will
be filled with partner's data.

The event registration values email, name, phone and mobile will be changed if the
related partner values are changed and the event end date hasn't passed yet.

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/event/issues/new?body=module:%20partner_event%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
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`__:

* Pedro M. Baeza
* Antonio Espinosa
* Jairo Llopis
* Vicent Cubells
* David Vidal
* Rafael Blasco
* Víctor Martínez
* Stefan Ungureanu

* `Antiun <https://antiun.com/>`__:

* Javier Iniesta

* `Anil Kesariya`

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.

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions partner_event/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import models
from . import wizard
from .hooks import post_init_hook
29 changes: 29 additions & 0 deletions partner_event/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2014 Tecnativa S.L. - Pedro M. Baeza
# Copyright 2015 Tecnativa S.L. - Javier Iniesta
# Copyright 2016 Tecnativa S.L. - Antonio Espinosa
# Copyright 2016 Tecnativa S.L. - Vicent Cubells
# Copyright 2017 Tecnativa S.L. - David Vidal
# Copyright 2018 Jupical Technologies Pvt. Ltd. - Anil Kesariya
# Copyright 2020 Tecnativa S.L. - Víctor Martínez
# Copyright 2023 Tecnativa S.L. - Carolina Fernandez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Link partner to events",
"version": "16.0.1.0.0",
"category": "Marketing",
"author": "Tecnativa," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/event",
"development_status": "Production/Stable",
"license": "AGPL-3",
"depends": ["event"],
"data": [
"security/ir.model.access.csv",
"views/res_partner_view.xml",
"views/event_event_view.xml",
"views/event_registration_view.xml",
"wizard/res_partner_register_event_view.xml",
],
"post_init_hook": "post_init_hook",
"installable": True,
}
19 changes: 19 additions & 0 deletions partner_event/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2019 David Vidal
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html
from odoo import SUPERUSER_ID, api


def post_init_hook(cr, registry):
"""Preload proper attendee partner for existing registrations using
the same rules the module does"""
env = api.Environment(cr, SUPERUSER_ID, {})
attendees_emails = env["event.registration"].read_group(
[("email", "!=", False)], ["email"], groupby="email"
)
for email in attendees_emails:
attendee_partner = env["res.partner"].search(
[("email", "=ilike", email["email"])], limit=1
)
if attendee_partner:
attendees = env["event.registration"].search(email["__domain"])
attendees.write({"attendee_partner_id": attendee_partner.id})
166 changes: 166 additions & 0 deletions partner_event/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_event
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-03 16:30+0000\n"
"PO-Revision-Date: 2019-08-20 14:44+0000\n"
"Last-Translator: Jairo Llopis <jairo.llopis@tecnativa.com>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.7.1\n"

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_res_partner__registration_count
#: model:ir.model.fields,field_description:partner_event.field_res_users__registration_count
msgid "Attendances"
msgstr "Asistencias"

#. module: partner_event
#: model_terms:ir.ui.view,arch_db:partner_event.view_registration_search
msgid "Attended"
msgstr "Asistido"

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_event_registration__attendee_partner_id
msgid "Attendee Partner"
msgstr "Empresa asistente"

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_event_registration__partner_id
msgid "Booked by"
msgstr ""

#. module: partner_event
#: model_terms:ir.ui.view,arch_db:partner_event.res_partner_register_event_view
msgid "Cancel"
msgstr "Cancelar"

#. module: partner_event
#: model:ir.model,name:partner_event.model_res_partner
msgid "Contact"
msgstr "Contacto"

#. module: partner_event
#: model_terms:ir.ui.view,arch_db:partner_event.view_partner_form_registrations
msgid "Count of events with confirmed registrations."
msgstr "Cantidad de eventos con asistencia confirmada."

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_event_event__create_partner
#: model:ir.model.fields,field_description:partner_event.field_event_session__create_partner
msgid "Create Partners in registration"
msgstr "Crear empresas en el registro"

#. module: partner_event
#: model_terms:ir.ui.view,arch_db:partner_event.res_partner_register_event_view
msgid "Create registrations"
msgstr "Crear registros"

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_res_partner_register_event__create_uid
msgid "Created by"
msgstr "Creado por"

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_res_partner_register_event__create_date
msgid "Created on"
msgstr "Creado el"

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_res_partner_register_event__display_name
msgid "Display Name"
msgstr "Nombre mostrado"

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_res_partner_register_event__errors
msgid "Errors"
msgstr "Errores"

#. module: partner_event
#: model:ir.model,name:partner_event.model_event_event
#: model:ir.model.fields,field_description:partner_event.field_res_partner_register_event__event
msgid "Event"
msgstr "Evento"

#. module: partner_event
#: model:ir.model,name:partner_event.model_event_registration
msgid "Event Registration"
msgstr "Registro a evento"

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_res_partner__event_registration_ids
#: model:ir.model.fields,field_description:partner_event.field_res_users__event_registration_ids
msgid "Event registrations"
msgstr "Registros a eventos"

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_res_partner_register_event__id
msgid "ID"
msgstr "ID"

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_res_partner_register_event____last_update
msgid "Last Modified on"
msgstr "Última modificación el"

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_res_partner_register_event__write_uid
msgid "Last Updated by"
msgstr "Última actualización por"

#. module: partner_event
#: model:ir.model.fields,field_description:partner_event.field_res_partner_register_event__write_date
msgid "Last Updated on"
msgstr "Última actualización el"

#. module: partner_event
#: model:ir.actions.act_window,name:partner_event.action_partner_register_event
msgid "Register in an event"
msgstr "Registrar en un evento"

#. module: partner_event
#: model:ir.model,name:partner_event.model_res_partner_register_event
msgid "Register partner for event"
msgstr "Registrar empresa al evento"

#. module: partner_event
#: model:ir.actions.act_window,name:partner_event.act_partner_registration
msgid "Registrations"
msgstr "Registros"

#. module: partner_event
#: model_terms:ir.ui.view,arch_db:partner_event.res_partner_register_event_view
msgid "Select event to register"
msgstr "Selecciona el evento para registrar"

#. module: partner_event
#: model_terms:ir.ui.view,arch_db:partner_event.res_partner_register_event_view
msgid ""
"These partners haven't been registered because they\\'re "
"already registered or other error occurred"
msgstr ""
"Estas empresas no se han registrado porque ya estaban "
"registradas u otro error ocurrió"

#~ msgid "Event attended registrations number"
#~ msgstr "Nº de registrados que han asistido al evento"

#~ msgid "Event registrations number"
#~ msgstr "Nº Registros a eventos"

#~ msgid "Events"
#~ msgstr "Eventos"

#~ msgid "Partner"
#~ msgstr "Empresa"

#~ msgid "or"
#~ msgstr "o"
Loading
Loading