- If we try to delete an answer which is already been selected by attendees,
it throws a validation error saying "There must be suggested value or
text value". The constraint here does important check, which makes sure that
the answer must have a valid value (either selection or text) otherwise the
answer record is of no use, and keeping such records doesn't make sense.
Thus it prevents corrupting the historic responses. For example, if attendees
answered a selection question with particular option and we try to delete the
same option from event question, the constraint will not let us delete that,
because the answers with this option selected will be of no use.
However, the current validation error message does not make it clear to the
user trying to delete the selection options which are present in the answers.
- The same goes for event questions. If we try to delete a question which is
already been answered by attendees, it throws a raw sql error message to
prevent corrupting the historic responses.
With this commit, we simply improve the validation error messages for both the
above cases. While deleting the answer selection, we now raise a UserError from
`_unlink_except_selected_answer` method saying "You cannot delete an answer
that has already been selected by attendees." And while deleting the question
itself, we now raise a UserError from `_unlink_except_answered_question` method
saying "You cannot delete a question that has already been answered by attendees."
TaskID-2635599
closesodoo/odoo#76265
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
The 'Configure Tickets' button has been extracted to a template to ease
re-usability.
The template's structure has been modified to allow improvement about
this button's display.
We also removed some seemingly useless steps during the end-suer testing tours.
Task-2459617
closesodoo/odoo#71584
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Clean the ACLs related to the Event application.
Add a new group to manage the registration in the entrance of an event. This
group should not be able to modify or remove records in Event but should be
able to create and manage the registrations.
Specifications
==============
Now, there are 3 event groups
* ``Registration Desk User``, who can manage the registrations and
read all event-related information;
* ``Event User`` who can create event, sponsor, ticket... His role is
to globally handle events on a day-to-day basis;
* ``Event Administrator`` who can create event type, sponsor type,
ticket type... His role is to manage the way events are managed withint
its company:
Each group implies all previous groups.
Compared to previous event users gain a lot of rules, allowing to update
records like tickets, registrations, ... Low-end event users should now
use the registration desk group.
Links
=====
Task ID-2204364
COM odoo/odoo#57022
ENT odoo/enterprise#13984
UPG odoo/upgrade#1897
Conversion of all modules to the new manifest assets declaration.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
changed the start/end date fields to datetime fields, in order to allow more
flexibility for the user and enable them to set a precise point in time at
which ticket sales should start/end, because otherwise ticket sales/end would
always be set at midnight which is not very flexible.
Task-2431440
closesodoo/odoo#65133
Related: odoo/upgrade#2126
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
In event, many files have different naming format. We want to clean
them, to group the lines by models before changing and adding a new
event group.
Task 2204364
PR odoo/odoo/pull/65867
Migration odoo/upgrade/pull/2150
Including demo data this time
closesodoo/odoo#58862
X-original-commit: 575abde110acb3d12b25f177a863374becef0894
Related: odoo/enterprise#13705
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
During the `test_01_tickets_questions` a tour is started as a portal
user to reserve tickets for the newly created event.
At the end of the tour, a modal is opened and once filled, the `continue`
button is used. The problem is that the tour stops without waiting but
the python tests continues. If the HttpCase session is cleared before
the tickets are registered, the test fails with a `400 Bad Request:
Session expired` warning and the next python assertion cannot be
fullfilled.
closesodoo/odoo#57400
X-original-commit: 33896d8f0d60bfa26601f1c5ca49009fcf735ab0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
PURPOSE
Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae
Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.
In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.
RATIONALE
_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.
track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.
SPECIFICATIONS
Rename some Xml IDs to ease future maintenance of views, as event application
has a lot of sub modules adding their own fields inside base view of event
models.
LINKS
Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#165#
Adding some steps and checks, notably
* add questions and fill them while registering;
* in unit test launching tour, check content of registration
as well as visitor;
LINKS
Task ID-2169118
odoo/odoo#55967odoo/enterprise#12438
X-original-commit: 83f5c49f8f6734ab2beb9347029cbb69d154d15d
Remove "General questions" label in registration. According to our test user
base it is confusing.
Task ID-2169118
odoo/odoo#55967odoo/enterprise#12438
X-original-commit: 7e2b24bb8c2361896b069d138991b487e2f09bfe
PURPOSE
Provide some fixes after internal test deployment of event online features.
Notably: user registration flow, various fixes in templates.
Also add some unit tests to avoid regressions while working on event features.
LINKS
Task ID-2169118
odoo/odoo#55967odoo/enterprise#12438
X-original-commit: e66684b23eebaadc3df7b908427d3d7a83d4f0a0
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.
Add sudo for other operations on ir.actions.*
The tests must be only imported in a test context, not in a running
context.
Since 92a7f8c a new test requirement was added but it should
not be necessary to run a module, only to execute the tests.
closesodoo/odoo#53628
Related: odoo/enterprise#11882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Add a domain on question_id. Its event should be the same as registration
event. Otherwise when editing in backend all questions are available while
only those related to the registration's event should be.
Task ID 2244487
PR odoo/odoo#52998
FwdPort of odoo/odoo#52923
X-original-commit: 25d53430f32598a5db65be807756182d2063b3ee
PURPOSE
Fix various issues spotted in 13.3 when testing event. Notably
computation of 2many fields coming from template.
SPECIFICATIONS
When updating template on an event, one2many fields should be better managed.
Previous heuristic was
* if event type uses o2m configuration (use_ticket / _schedule / _question)
and has lines
* erase existing lines;
* create new lines based on old one;
This has the drawback of loosing information of what is sent (mail) or
sold (tickets) or answered( questions). Another drawback is that only
types having line are synchronized. This means that if updating several
times the event type you could end up with an XMas configuration with
lines coming from different event types, depending on their o2m configuration.
We choose a better heuristic that should solve this issue
* every time we change type, independently of its use_* field that is used
mainly for UX on the type itself:
* erase existing lines that have not been used yet (no mail sent, no
ticket linked to registrations, no answer linked to registrations)
* create new lines based on old one; if type has no lines, event will
have its old empty line erased as well;
It means that we try to synchronize more the type to the event while keeping
configuration line already used in some registrations.
Also provide some other fixes like deletion restrictions or better domain
for UX purpose. See sub commits for more details.
LINKS
Task ID 2244487
PR odoo/odoo#52998
FwdPort of odoo/odoo#52923
X-original-commit: 645f70cad033083e82a3ef9102c694c331badef9
Co-authored-by: Sebastien Mottet <oms@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
This commit adds necessary views and actions for users to be able to
conveniently analyze attendees answers.
- A graph view showing counts of each suggestions for simple_choice questions
- A pivot view showing registrations vs answers for simple_choice questions
- A tree view showing textual answers values for text_box questions
(Tree view is also available for simple_choice)
LINKS
PR #45497
Task 2189529
This commit does not change anything functionally, we just move views around to
appropriate xml files so that everything is organized better.
At the same time, a few views were renamed to match guidelines and we removed
a useless view on event.question.answer, that will only ever be edited inline
or inside many2many_tags.
LINKS
PR #45497
Task 2189529
When applying an event.category on an event.event, we copy the event.questions
from the event.type, but we don't immediately copy the answers associated to
these questions.
This was not done for technical reasons, we were limited by the JS framework.
Since #46807
We now correctly handle nested o2m when triggering compute/onchange.
This commit cleans the code by correctly copying the answers along with the
questions when changing the event.type of an event.event.
LINKS
PR #45497
Task 2189529
This commit adds the display_name to the list of fields so that the view will
correctly compute it and store it in the record state to be displayed by the
associated m2m_tags widget.
Without that small trick the display_name is never computed and the m2m_tags
widget shows empty strings.
LINKS
PR #45497
Task ID 2189529
This commit adds a test tour that will fill up two tickets with a few questions
answers and then assert that the answers are correctly saved for each attendee.
This will help ensuring that the new "free text question" feature works
correctly, along with existing "suggestion question".
LINKS
PR #45497
Task ID 2189529
This commit improves the demo data of the event application by adding a few
questions to better showcase the new 'free text question' feature.
LINKS
PR #45497
Task ID 2189529
PURPOSE
Allow "free text" questions in the event questions asked to attendees, in
addition to the existing "selection" type.
e.g: "What are your allergies?"
SPECS
The implementation is heavily based on the modelisation we chose for the survey
module since the features become similar in terms of question types and inputs.
- Introduce a 'question_type' that is either 'simple_choice'
(= previous behavior) or 'text_box' that will contain the attendee text
answer.
- Rename the event.answer model to event.question.answer to make it more
obvious that it contains answer "suggestions" to a question of type
'simple_choice'.
- Introduce a 'event.user_input.line' that is an answer to a specific question
for a specific registration.
It works very similarly to 'survey.user_input.line' but it's not contained in
a 'user_input' model, it's directly linked to the registration using a
'user_input_line_ids' o2m field.
The frontend view has been adapted accordingly to display either a selection
input or a textarea based on the question type.
The frontend orm processing now takes in both answer types (id of suggested
answer or text input).
On the backend side, views have been adapted to display event questions and
attendee answers in a more convenient and logical manner.
LINKS
PR #45497
Upgrade PR odoo/upgrade#799
Task ID 2189529
PURPOSE
The commit removes the reporting on the event.question model along with its
created SQL view 'event.question.report' because they're simply not usable.
SPECS
Based on latest testing, the reporting was completely unusable if you have more
than a hundred questions (all events combined) and needs to be refactored based
on new specifications.
As we need to re-work event questions to be able to add "free text" questions,
we prefer to temporarily drop the reporting instead of having to adapt it.
LINKS
PR #45497
Upgrade PR odoo/upgrade#799
Task 2189529
PURPOSE
Change the event form view to improve its usability and make it clearer.
SPECIFICATIONS
- Change some stats buttons icons
- Change order of the fields and put the range date field in second
place since it's a mandatory field.
LINKS
Task ID : 2198660
PR : #46659
PURPOSE
Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.
SPECIFICATIONS: GLOBAL RULES
Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.
Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.
Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.
SPECIFICATIONS: REQUIRED FIELDS
As computed fields are computed after create required attribute cannot be
respected without computing them beforehand. That is why we have some custom
code to compute required fields if not given at create and update the creation
values accordingly.
SPECIFICATIONS: MAIL SCHEDULING
Mail scheduling on event type is modified in this commit. Previously checking
the use_mail_schedule radio button had no effect on event_type_mail_ids field.
It is now reset if unchecked. It is therefore coherent with use_ticket and
event_type_ticket_ids field behavior.
LINKS
Task ID 2089156
Community PR odoo/odoo#42911
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Michaël Mattiello <mcm@odoo.com>
When user register to an event from website, they can answer questions
specific to a given registration or to all registrations. However they
are not correctly parsed and not saved.
Task 2188857
PR #44545
X-original-commit: e27d9b5c4f234f6ce64456c2f52e7cfb0331332f
PURPOSE
Questions asked to attendees are usually attendee specific according to
"statistics". It makes therefore sense to have a field activating the global
question mode that is False by default.
SPECIFICATIONS
Inverse behavior of boolean 'is_individual' and rename it to 'once_per_order'.
By default it is set to False, meaning all questions are individual.
LINKS
TaskID 2162438
Community PR odoo/odoo#44476
Upgrade PR odoo/upgrade#771
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
PURPOSE
This commit is part of ticket model support directly in event application.
SPECIFICATIONS
Some demo data is updated in order to be able to show directly tickets
feature in event, with some registrations already configured. Some basic
demo for questions is also added on first event demo in order to have a
complex event usable in demo mode.
LINKS
Task ID 2177281
Community PR #43488
PURPOSE
Integration between event and eCommerce is required only when users handle the
entire selling process online. However users may require ticketing support
while managing payments outside of Odoo. Purpose of this commit is to support
tickets directly in event application without need of sales.
RATIONALE
Remove the need to have event_sale installed to manage basic multi ticket
event type. Integration with eCommerce is needed only when one wants to handle
the entire selling flow online, i.e. order, payment, ... Integration with
Sales is needed only when one wants to create sale orders linked to attendees.
Many event users do not need all of this. Their attendees pay through bank
transfers or they simply manage payments outside of Odoo while still
requiring tickets management.
SPECIFICATIONS
In this commit we move frontend part of ticket support from website_event_sale
to website_event. Now eCommerce / event integration adds only payment
information when registering.
About tickets
* if there is no ticket -> generic registration allowed;
* if there is one ticket -> quick registration box;
* more than one ticket -> unfolding registration box with all available
tickets;
About price
* sale not installed -> no mention of price. A ticket without price is not
free. Its description allow to tell how to pay for example;
* a price is set: price is displayed;
* no price is set: FREE is displayed;
Most event frontend templates and controllers are therefore moved from
website_event_sale to website_event. Only part about pricing and sale order
creation is now located in website_event_sale.
Buy flow remains mainly untouched. Indeed this commit is mainly about moving
template to support tickets.
LINKS
Task ID 2177281
Community PR #43488
PURPOSE
As event will soon evolve (onchange -> compute, code improvements, addition of
new features) cleaning and improving tests is necessary to help avoid issues.
SPECIFICATIONS
As event model grow in complexity and features, it is easier to find its
way through the application with having registration model lying in its
own file to separate it from event-specific models (event.type, event.event).
Ticket (event_sale) and sponsor (website_event_track) models are also extracted
in their own file.
LINKS
LINKS
Side effect of Task ID 2089156 (event onchange to compute)
Community PR odoo/odoo#43127
Enterprise PR odoo/enterprise#7656
PURPOSE
As event will soon evolve (onchange -> compute, code improvements, addition of
new features) cleaning and improving tests is necessary to help avoid issues.
SPECIFICATIONS
Clean existing tests: lessen data / variables, try to remove unnecessary
tests or merge duplicates.
Add new tests, notably event type configuration copy onto event records
is not well tested. Event computed fields are also more tested.
Some access tests are added, more a base for future addition as only a few
use cases are covered.
LINKS
Side effect of Task ID 2089156 (event onchange to compute)
Community PR odoo/odoo#43127
Enterprise PR odoo/enterprise#7656
Without demo data, for the odoo-master transifex project
closesodoo/odoo#41935
X-original-commit: dab7670b73506fb3a835695ee3bd735e0c5e5c2b
Related: odoo/enterprise#7287
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía
closesodoo/odoo#41624
X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Add a domain that limits to the answers belonging an event only on the
attendee form.
Make the width of the event_type_mail_ids 100%
Sort event.registrations by id DESC and Kanban view by name
task-2071337
closesodoo/odoo#37256
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>