-
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
949 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
============================================= | ||
Reasons for event registrations cancellations | ||
============================================= | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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%2Fevent-lightgray.png?logo=github | ||
:target: https://github.com/OCA/event/tree/11.0/event_registration_cancel_reason | ||
:alt: OCA/event | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/event-11-0/event-11-0-event_registration_cancel_reason | ||
: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/11.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module allows to add predefined reasons for the attendees to report back | ||
why they cancel their registration to an event. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, you need to: | ||
|
||
#. Go to **Events > Configuration > Registrations cancellation reasons** for setting the possible reasons you want to handle. | ||
|
||
You can also set if a reason | ||
is only available for certain types of events or if you leave it empty, for | ||
all. | ||
|
||
Usage | ||
===== | ||
|
||
#. Go to **Events > Events** | ||
#. Enter into the details of any of the events. | ||
#. Press the button "Attendees", located at the top right hand corner. | ||
#. Press the red circle button in the right part of any of the registrations. | ||
#. A new screen will appear asking you to enter the reason why the registration is cancelled. | ||
|
||
You will get also the same screen: | ||
|
||
#. Go to **Events > Attendees**. | ||
#. Enter into the details of any of the attendees. | ||
#. Press the button *Cancel registration*. | ||
|
||
On this object, you can group by the cancellation reason in the list, calendar or graph view. | ||
|
||
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:%20event_registration_cancel_reason%0Aversion:%2011.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 | ||
* Vicent Cubells | ||
* Cristina Martín | ||
|
||
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/11.0/event_registration_cancel_reason>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from . import models | ||
from . import wizard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2016 Antiun Ingeniería S.L. | ||
# Copyright 2016 Tecnativa - Pedro M. Baeza | ||
# Copyright 2017 Tecnativa - Vicent Cubells | ||
# Copyright 2018 Tecnativa - Cristina Martin | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
{ | ||
"name": "Reasons for event registrations cancellations", | ||
"version": "11.0.1.0.0", | ||
"license": "AGPL-3", | ||
"author": "Tecnativa, " | ||
"Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/event", | ||
"category": "Marketing", | ||
"depends": [ | ||
'event', | ||
], | ||
"data": [ | ||
'security/ir.model.access.csv', | ||
'views/event_registration_view.xml', | ||
'wizard/event_registration_cancel_log_reason_view.xml', | ||
], | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * event_registration_cancel_reason | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 8.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2016-02-15 16:33+0100\n" | ||
"PO-Revision-Date: 2016-02-15 16:34+0100\n" | ||
"Last-Translator: <>\n" | ||
"Language-Team: \n" | ||
"Language: es\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: \n" | ||
"X-Generator: Poedit 1.8.6\n" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: view:event.registration.cancel.log.reason:event_registration_cancel_reason.event_registration_cancel_log_reason_view | ||
msgid "Abort" | ||
msgstr "Abortar" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: view:event.registration.cancel.log.reason:event_registration_cancel_reason.event_registration_cancel_log_reason_view | ||
msgid "Cancel registration" | ||
msgstr "Cancelar registro" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: view:event.registration:event_registration_cancel_reason.view_event_registration_form | ||
msgid "Cancellation Reason:" | ||
msgstr "Razón de cancelación:" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: view:event.registration:event_registration_cancel_reason.view_registration_search | ||
#: field:event.registration,cancel_reason_id:0 | ||
msgid "Cancellation reason" | ||
msgstr "Razón de cancelación" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: field:event.registration.cancel.log.reason,create_uid:0 | ||
#: field:event.registration.cancel.reason,create_uid:0 | ||
msgid "Created by" | ||
msgstr "Creado por" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: field:event.registration.cancel.log.reason,create_date:0 | ||
#: field:event.registration.cancel.reason,create_date:0 | ||
msgid "Created on" | ||
msgstr "Creado en" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: model:ir.model,name:event_registration_cancel_reason.model_event_registration | ||
msgid "Event Registration" | ||
msgstr "Registro evento" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: field:event.registration.cancel.log.reason,event_type_id:0 | ||
msgid "Event type" | ||
msgstr "Tipo de evento" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: field:event.registration.cancel.reason,event_type_ids:0 | ||
msgid "Event types" | ||
msgstr "Tipos de evento" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: field:event.registration.cancel.log.reason,id:0 | ||
#: field:event.registration.cancel.reason,id:0 | ||
msgid "ID" | ||
msgstr "ID" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: field:event.registration.cancel.log.reason,write_uid:0 | ||
#: field:event.registration.cancel.reason,write_uid:0 | ||
msgid "Last Updated by" | ||
msgstr "Última actualización por" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: field:event.registration.cancel.log.reason,write_date:0 | ||
#: field:event.registration.cancel.reason,write_date:0 | ||
msgid "Last Updated on" | ||
msgstr "Última actualización en" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: field:event.registration.cancel.reason,name:0 | ||
msgid "Reason" | ||
msgstr "Razón" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: field:event.registration.cancel.log.reason,reason_id:0 | ||
msgid "Reason id" | ||
msgstr "Razón" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: model:ir.actions.act_window,name:event_registration_cancel_reason.event_registration_cancel_reason_action | ||
#: model:ir.ui.menu,name:event_registration_cancel_reason.menu_event_registration_cancel_reason | ||
msgid "Registration cancellation reasons" | ||
msgstr "Razones de cancelación de registros" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: help:event.registration.cancel.reason,event_type_ids:0 | ||
msgid "" | ||
"Select the event types where you want to use this cancellation reason. Leave " | ||
"it empty for using in all." | ||
msgstr "" | ||
"Seleccione los tipos de evento en los que quiere usar esta razón de " | ||
"cancelación. Déjelo en blanco para usarla en todos." | ||
|
||
#. module: event_registration_cancel_reason | ||
#: view:event.registration.cancel.log.reason:event_registration_cancel_reason.event_registration_cancel_log_reason_view | ||
msgid "Select the reason for cancelling the registration:" | ||
msgstr "Seleccione la razón para cancelar el registro:" | ||
|
||
#. module: event_registration_cancel_reason | ||
#: code:addons/event_registration_cancel_reason/wizard/event_registration_cancel_log_reason.py:31 | ||
#, python-format | ||
msgid "You cannot cancel registrations from events of different types at once." | ||
msgstr "No puede cancelar registros de eventos de distintos tipos a la vez." | ||
|
||
#. module: event_registration_cancel_reason | ||
#: view:event.registration.cancel.log.reason:event_registration_cancel_reason.event_registration_cancel_log_reason_view | ||
msgid "or" | ||
msgstr "o" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from . import event_registration |
43 changes: 43 additions & 0 deletions
43
event_registration_cancel_reason/models/event_registration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Copyright 2016 Antiun Ingeniería S.L. | ||
# Copyright 2016 Tecnativa - Pedro M. Baeza | ||
# Copyright 2017 Tecnativa - Vicent Cubells | ||
# Copyright 2018 Tecnativa - Cristina Martin | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from openerp import api, fields, models | ||
|
||
|
||
class EventRegistration(models.Model): | ||
_inherit = 'event.registration' | ||
|
||
cancel_reason_id = fields.Many2one( | ||
comodel_name='event.registration.cancel.reason', readonly=True, | ||
string="Cancellation reason", ondelete="restrict") | ||
|
||
@api.multi | ||
def button_reg_cancel(self): | ||
if self.env.context.get('bypass_reason'): | ||
return super(EventRegistration, self).button_reg_cancel() | ||
return { | ||
'type': 'ir.actions.act_window', | ||
'name': 'Cancellation reason', | ||
'res_model': 'event.registration.cancel.log.reason', | ||
'view_type': 'form', | ||
'view_mode': 'form', | ||
'target': 'new', | ||
} | ||
|
||
@api.multi | ||
def do_draft(self): | ||
super(EventRegistration, self).do_draft() | ||
self.write({'cancel_reason_id': False}) | ||
|
||
|
||
class EventRegistrationCancelReason(models.Model): | ||
_name = 'event.registration.cancel.reason' | ||
|
||
name = fields.Char('Reason', required=True, translate=True) | ||
event_type_ids = fields.Many2many( | ||
comodel_name="event.type", string="Event types", | ||
help="Select the event types where you want to use this cancellation " | ||
"reason. Leave it empty for using in all.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
To configure this module, you need to: | ||
|
||
#. Go to **Events > Configuration > Registrations cancellation reasons** for setting the possible reasons you want to handle. | ||
|
||
You can also set if a reason | ||
is only available for certain types of events or if you leave it empty, for | ||
all. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* `Tecnativa <https://www.tecnativa.com>`__: | ||
|
||
* Pedro M. Baeza | ||
* Vicent Cubells | ||
* Cristina Martín |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This module allows to add predefined reasons for the attendees to report back | ||
why they cancel their registration to an event. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#. Go to **Events > Events** | ||
#. Enter into the details of any of the events. | ||
#. Press the button "Attendees", located at the top right hand corner. | ||
#. Press the red circle button in the right part of any of the registrations. | ||
#. A new screen will appear asking you to enter the reason why the registration is cancelled. | ||
|
||
You will get also the same screen: | ||
|
||
#. Go to **Events > Attendees**. | ||
#. Enter into the details of any of the attendees. | ||
#. Press the button *Cancel registration*. | ||
|
||
On this object, you can group by the cancellation reason in the list, calendar or graph view. |
2 changes: 2 additions & 0 deletions
2
event_registration_cancel_reason/security/ir.model.access.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_event_registration_cancel_reason,event.registration.cancel.reason,model_event_registration_cancel_reason,event.group_event_user,1,1,1,1 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.