Commit Graph
289 Commits
Author SHA1 Message Date
Florian Charlier 9540dc7772 [IMP] event: Improve logic and appearence of archived registrations
When an attendee's registration was archived, their seat was still
considered taken, which could be problematic such as in cases of
limited seat availability.

Only non-archived registrations are now counted as seats. The same
error as with regular registrations will be raised if there are not
enough seats available to un-archive a registration. These ValidationError
messages now show the name of the fully booked event.

A few python tests are included to verify the impact of (un)archiving on
seats availability for events and for event tickets.

The appearence of archived registrations was also not different in form
and kanban views, which is somewhat confusing and inconsistent with the
aspect of archived records in Odoo. Actions buttons are not available on
archived records.

Filtering in the archived records needed to be simplified from a "Custom
Filter" to a one-click feature, already available for many models.

Task-2646298

closes odoo/odoo#77715

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-17 11:04:53 +00:00
Thibault Delavallée 7ef380fe34 [IMP] event: add precompute to remove create hook
On event model, seats_limited and date_tz are required but are editable stored
fields. An override of create has been added to ensure they have a value as
compute are called after creation which leads to required not being satisfied.

Now that precompute [1] is available this code can be safely replaced.

Performance tests (not yet merged [2]) indicate this has no impact on queries.
What was done manually before this commit is now done directly by the ORM.

[1] odoo/odoo@d04a5b5c8c
[2] odoo/odoo#81068

Task-2702872 (Event precompute)

closes odoo/odoo#80672

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-12-08 15:36:51 +00:00
ijas ahammed 8c8c757869 [IMP] event,website_event: improve attendees form view
In this commit we have changed some order of fields in
attendees form view, changes are listed below,

 - moved `partner_id` field next to `event_ticket_id` and
   made this field editable and trackable, this change had done because
   currently this is the first field you see and it currently
   looks like this is the person that's coming.

 - moved `visitor_id` field below `mobile` field, so that even
   in debug mode, Attendee Name is the "primary" field.

Apart from that right now if there are attendee data (name/email/phone)
and when we update the partner_id these attendee data will be erased
and updated as the new partner's information.

In this commit we are improving this, if there is any attendee data
it will not get erased while partner_id is updated. Attendee data
will get updated only if name/email/phone fields are empty.

TaskID-2670765

Part-of: odoo/odoo#79166
2021-11-30 12:52:16 +00:00
ijas ahammed 0900675903 [IMP] event: remove the date_open field
In this commit we have removed the `date_open`
field from the model `event.registration` as it
is a duplicate of the `create_date`.

TaskID-2670765

Part-of: odoo/odoo#79166
2021-11-30 12:52:16 +00:00
Thibault Delavallée 3659546738 [IMP] mail, various: support email notification xmlid at model level in composer
RATIONALE

Currently we can specify email used for notification layouting through context
use in mail composer. It is then propagated to message_post, stored on
mail.message and used to encapsulate emails sent based on posted messages.

SPECIFICATIONS

Get rid of context usage (``custom_layout``) and use a real field on composer
model: ``email_layout_xmlid``. Use now a default value coming from context
(default_email_layout_xmlid) instead of custom_layout.

Support old context key in composer for backward compatibility, working like
a default value for the field itself.

Task-2621326 (Mail: add 'view' button in 'light notification template')
Task-2647302 (Mail: add layout field in composer)
UPG odoo/upgrade#2829

Part-of: odoo/odoo#76418
2021-11-10 09:58:09 +00:00
Martin Trigaux 8ae1a43663 [FIX] base: correct evaluation context for report rendering
Fix of 57665a02f7b4 which was problematic in point_of_sale
2021-01-19 11:09:41 +01:00
Fabio Barbero 44e5f0cd2c [IMP] event_*, website_event_*: improve UI
Purpose
=======
Give the user a better experience when handling events by removing
useless views and using coherent names of fields.

Specifications
==============
Add placeholders in multiple fields, change names in event_event module
to be more consistent with each other, remove and add filters/measures
in events and tracks.

Task-2646692

closes odoo/odoo#77389

Related: odoo/enterprise#21294
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-26 19:40:39 +00:00
Fabio Barbero d713e6341e [FIX] event: stop sending confirmation email as public user
Purpose
=======
Fix guest users receiving confirmation emails for events by "Public User".

Specifications
==============
Confirmation emails for events are sent by:

- Organizer (if set)
- Company email (if set)
- The users's email
- Odoo bot otherwise

Task-2657588

closes odoo/odoo#78946

X-original-commit: 45c22f32e97479af2adb5958b75ded32c41d80e8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-26 13:22:52 +00:00
Nathan Marotte (nama) 07adca3c69 [FW][FIX] event : Changing seats_max could desync seates_reserved
Issue: Sometimes, when changing the Maximum (seats_max) on one of
the tickets of an event, it triggered a recompute for the other tickets

Steps to reproduce :

Install Events
Settings > Event > Enable "Tickets"
Create an event template (or use Sell Online default one) with
Check "Ticketing" and set the line price to 0
Create an event :
with that template
and Autoconfirm checked
Add a line for the Tickets:
name: VIP
price: 10
Save the event

Create two attendees for the event, one for each
Event Ticket (event_ticket_id) and confirm them (on the form, not
Confirm Attendee)

Change the Maximum (seats_max) of one ticket and save
-> the Confirmed (seats_reserved) will be recomputed but the
confirmed for the other ticket will increase as well

Side-Note:
I haven't been able to find a deterministic way to reproduce the bug
but it seems that the bug appear the most when doing all the steps at
once, and trying to not log out or refresh the page.
Also it works best on a runbot or at least with runbot data.

Without my modification, the new test passes on my local odoo server,
but fails on a dump of a runbot on my computer, adding my modification
makes it work on either case

Why is that a bug:
The recomputation seems to fail for some reason, we are setting all
the event/ticket in self to 0, but only update the value of those by
fetching a SQL query so there might be a desync there

opw-2642555

closes odoo/odoo#78023

Forward-port-of: #76492
X-original-commit: f4c936c9dc141de27a77006fb87dd2b63d88ec97
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Nathan Marotte <nmarotte@users.noreply.github.com>
2021-10-08 07:20:01 +00:00
Thibault DelavalléeandVictor Feyens 2f4d582a79 [IMP] event(_*): limit usage of search
Purpose of this commit is to globally improve code performance by limiting
search impact by

  * adding limits when only first found record id used;
  * avoid unnecessary searches when record set can be filtered instead;

Task-2638444
PR odoo/odoo#76005

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Victor Feyens <vfe@odoo.com>
2021-09-08 07:56:03 +00:00
Patrick Hoste ac8fd6c1c5 [IMP] event: add is_finished field in event model
PURPOSE

The is_finished computed field was added in order to avoid
displaying the booths on the registration page and warn the
user with a message.

LINKS

Task-2318655
Closes : odoo/odoo#71104
2021-09-02 14:14:32 +00:00
Patrick Hoste 73078e9cfc [IMP] event: add setting option for event_booth module installation
PURPOSE

Adds the possibility to install the new module 'event_booth'
through the event settings.

LINKS

Task-2318655
Closes : odoo/odoo#71104
2021-09-02 14:14:31 +00:00
qmo-odoo b18efd703c [IMP] event: add default communication on events
Communication on events is considered as standard: receive a confirmation
at subscribe and receive reminders. We therefore set default event mail
on both template and event models

  * event.type has default communication with 3 emails;
  * event.event has default communication when no event type is chosen. When
    a template (event.type) is chosen its configuration is more important;

Task-2488019
PR odoo/odoo#68901
2021-08-23 14:59:00 +00:00
qmo-odoo aa5a2ce90c [IMP] website_event: do not repeat category name in name_get of tags
This commit cleans the display name of event.tags as there is no need
to repeat the category name. It adds noise without any added value.

Task-2488019
PR odoo/odoo#68901
2021-08-23 14:59:00 +00:00
Thibault Delavallée fad1c9f047 [FIX] event: correctly give a template when sending badge
Oversight of odoo/odoo@d9ffbe9e89 a valid template_id was incorrectly converted
into a reference field, used in event automated communication (which is not
the case when sending badge).

Task-2488019
PR odoo/odoo#68901
2021-08-23 14:59:00 +00:00
Aurélien Warnon 8bae36bc1a [FIX] event: fix savepoint issue with event mail scheduler
This commit removes a savepoint call when running the event mail scheduler.

Indeed, this save point registration was colliding with the fact that we commit
the assets bundle during the reporting process, see 'commit_assetsbundle'
context key.

Since the transaction was commit during the report generation, when reaching
the end of the savepoint block, the system was trying to release a savepoint
that was no longer existing.

Indeed, committing removes all savepoints, since (quoting the Postgres doc)
"Savepoints can only be established when inside a transaction block.", which
makes total sense.

This was leading to a:
bad query: RELEASE SAVEPOINT "669516d2915811eba8d2b4d5bde7cdcc"
Aborting the whole event mail scheduler process.

As it's rather unclear why this savepoint was introduced in the first place,
we attempt to remove it. This change is done in a singular commit to be easily
revertable if ever necessary.

Task-26779
2021-07-30 09:02:54 +00:00
Aurélien Warnon 44b55dc883 [IMP] [website_]event: add a new full page format badge report
This commit introduces a new badge report displayed on a full A4 page.

This report is meant to be printed for the attendee and contains more
detailed information that the existing "badge report", which is only meant to
be folded and used as a badge.

We use a lot of custom layout and classes to create a "ticket-feeling" to the
report and make it look good visually.

We also introduce a new field that allows easily customizing (outside of
studio) this report by adding "extra instructions" (how to use your ticket /
directions on how to get to the event / ...).

Side note: scss disclaimer

As the reporting engine does not allow complex class/rules building, we had to
implement this nice layout using very well placed background-image and
"pixel perfect" sized elements.

LINKS

ENT PR odoo/enterprise#19349
UPG PR odoo/upgrade#2599
Task-26779
2021-07-30 09:02:53 +00:00
Aurélien Warnon 1b66782dca [REF] event_*: refactor the event foldable registration badge
PURPOSE

The event foldable badge is currently not very user-friendly in terms of usage
and style.
This commit aims to re-work it visually as well as getting rid of multiple
technical flows (unnecessary fields / no studio anchors / ...).

SPECS

Preliminary cleaning : Unify both foldable badge templates into one.

The "event badges" report can be printed from 2 different sources, from the
event.event itself as a preview and from the event.registration as an actual
badge for a specific attendee.

The implementation was done using two different templates, leading to a lot of
duplicated code and potential issues when editing one template that would not
modify the other accordingly.

This commit unifies both templates into one.
When the report is printed from the event as a "preview", we simply check that
the attendee variable is missing and print placeholders instead.

Main changes : Rework the whole foldable badge template

1. Get rid of unnecessary fields

The foldable badge template used several fields on the event.event model itself
that would allow customizing the report per event.
However, there were actually no way for the user to access and edit those
fields, as they are not part of any views.

We therefore removed them (badge_front, badge_back, badge_innerleft,
badge_innerright, event_logo).

And instead offer a single new field (ticket_extra_instructions), available on
the form view of the event, that allows to easily customize the foldable badge
and adding instructions specific to this event (how to come / what to bring /
...).

2. Visual changes

The report was re-worked to make it look a bit more recent, as the previous
look was very basic and was not very attractive.

This was done using a specific scss file that allows defining rules without
bloating the template with long style attributes.

In addition, we added some pictures that help the attendee understanding how to
correctly fold the printed A4 sheet into a badge and slide it into the holder.

All the information that were previously on the report should still be there.

3. Relocate action from website_event to event

As a bonus, we moved the reporting action from website_event to event, in order
to have everything that is related to this foldable badge in the same module.

Side note: scss disclaimer

As the reporting engine does not allow complex class/rules building, we had to
implement this nice layout using very well placed background-image and
"pixel perfect" sized elements.

You will see a lot of hardcoded numbers, mainly on heights, but it can't be
helped.

LINKS

ENT PR odoo/enterprise#19349
UPG PR odoo/upgrade#2599
Task-26779
2021-07-30 09:02:52 +00:00
Debauche Stéphane d9ffbe9e89 [IMP] event: merge the SMS template and the mail template into one field
Purpose
=======
A new module "Event Social" will be added in the enterprise PR. This
new module will use a new template type, the "Social Post Template"
adding one more column in the communication tab...

We want to have only one column to select the template (Mail, SMS or
Post template) and therefor we need to use a reference field.

Technical
=========
As we can not set a domain on a reference field, we added a context key
and in the `_name_search` of the `mail/sms.template` we filter with the
domain we want if the key exists.

Links
=====
Task-2127615
See odoo/odoo/pull/46304
See odoo/enterprise/pull/7701
See odoo/upgrade/pull/848
2021-07-14 08:32:59 +00:00
nounoubensebia 89d72df22b [IMP] *_event_*: revamp event template form
This commit revamps the event template form to be similar to the event form
itself and removes unnecessary fields, purpose is to give more clarity to the
user.

It also fixes the order of the fields in the event form to be exactly
the same as in the front-end, so that the user don't get confused.

Task-2541208

closes odoo/odoo#71856

Ent-pr: https://github.com/odoo/enterprise/pull/19128
Upg-pr: https://github.com/odoo/upgrade/pull/2516
Related: odoo/enterprise#19128
Related: odoo/upgrade#2516
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-01 09:37:41 +00:00
dht-odoo 586ae4bcc4 [IMP] crm: improves description field type from text to html
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).

Models -> Fields

1) crm.lead -> description
2) event.event -> note

Task Id: 2499504

X-original-commit: 524e2f089a611d897b98d86001bda5d17263db66
2021-06-07 05:24:08 +00:00
Julien Banken c2b099ef76 [IMP] event: remove the dates from the urls and the default name of the events
PURPOSE

Previously, the url of the events contained the start and end date of
the event. This link can be sent by email. If an administrator changes
the start or the end date of the event, the event will still be accessible
via the provided link. However, the user can be misled because the dates
of the url will no longer match with those set on the event. To avoid
confusion, the start and the end date will be removed from the url.

SPECS

- Remove the start date and the end date of the event from: (1) the urls
  and (2) the default name of the events.

NOTE

Note that URLs are backward compatible as only the ID is really used to
find a record through routes.

LINKS

Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612

X-original-commit: 60be7bb337804f2fa59003d6e5dc70ecc9750427
2021-04-12 10:39:57 +00:00
Stéphane Debauche fc459bb908 [IMP] event: allow to archive registrations
Event users cannot unlink registrations. To help them in their daily job
we added an active field on registrations allowing to archive them
without unlinking them.

Task ID-2204364
COM odoo/odoo#57022
ENT odoo/enterprise#13984
UPG odoo/upgrade#1897
2021-04-02 13:43:39 +00:00
std-odoo e0c2a8a2cc [IMP] event_*: clean ACL and add a new group "Registration Desk"
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
2021-04-02 13:40:50 +00:00
Sunil Shrimali b5b2b55ddd [IMP] event: prevent copying kanban_state and stage_id
Currently, when duplicating an event, it also copies the stage_id and
kanban_state, which should be set to their respective default values.

This commit improves the behavior and sets the default values for
stage_id and kanban_state while duplicating an event.

taskID-2463576
COM PR odoo/odoo#67633

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-01 13:37:09 +00:00
nounoubensebia 417622d655 [IMP] [website_]event[_questions|_sale] datetimes sales start/end
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

closes odoo/odoo#65133

Related: odoo/upgrade#2126
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-25 14:58:20 +00:00
Thibault Delavallée 2520bfe625 [REF] event: manually update completion of mail schedulers
Purpose of this commit is to remove the "done" field computation. Indeed
it is based on either

  * mail_sent field if scheduler is global to the event (before or after
    event). This computation is light as this field changes only once
    when emails are scheduled and sent;
  * status of event registrations compared to all sent communication on
    those registrations. This is costly as adding a new registration changes

In this commit we therefore

  * rename ``done`` to ``mail_done`` to ease grep and understanding;
  * remove ``mail_sent`` as it is integrated within ``done``;
  * manually update ``mail_done`` when updating schedulers instead of doing
    it through a compute method;

Some code cleaning is performed to make it clearer and easier to understand.

LINKS

Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014
2021-03-24 11:18:47 +00:00
Debauche Stéphane 69df7d3d8a [IMP] event: improve event mail state display
Purpose
=======

Show an icon representing the state of the event mail and number of contacted
registrations instead of the simple checkbox "sent".

Specifications
==============

Instead of the checkbox "sent", an event mail can have 3 values

  1. Sent, if all the mails has been sent;
  2. Scheduled, if scheduled but no attendee have been contacted;
  3. Running, if not all attendees have been contacted;

Note that communication targeting "after registration" are always considered
as being "running" as any new registration triggers a new communication.

A new widget is added that displays an icon depending on the state.

A new field holding contact count is added. When scheduler send emails it is
updated to keep a count of sent communications.

LINKS

Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014
2021-03-24 11:18:42 +00:00
Thibault Delavallée e47725abd8 [FIX] event: fix missing trigger for scheduled mails based on event end date
Scheduled date is not correctly triggered if event date_end changes. It should
update its scheduled communications.

Task ID-2414658
COM PR odoo/odoo#63093
2021-03-24 11:18:14 +00:00
Stéphane Debauche 214d8fe589 [FIX] event: fix done field definition
Add missing trigger for done

Do not copy done field on event.mail model.

Task ID-2414658
COM PR odoo/odoo#63093
2021-03-24 11:18:11 +00:00
Thibault Delavallée db8f68f683 [MOV] event: cleanup registration code location
Purpose is to ease understanding of code. Ranging chaussettes in the correct
tiroir is important.

Task ID-2414658
COM PR odoo/odoo#63093
2021-03-24 11:18:09 +00:00
Thibault Delavallée b41fcc8458 [FIX] event: respect scheduled date when calling mail schedulers execute
In this commit we ensure calling ``execute`` method on communication schedulers
do not send emails or SMS if their scheduled date is still not achieved.
Currently only the cron method does it (see ``run``).

It is now safe to call ``execute`` directly on event communication schedulers.

Related to Task ID-2414658
COM PR odoo/odoo#68158

X-original-commit: 353bc5de9fafbc1527c382614e02438ee799c8a4
2021-03-19 18:38:30 +00:00
Thibault Delavallée 401e037850 [FIX] event: allow event user to confirm registrations even with mail schedulers
Due to ACLs it is currently impossible for event users to confirm a draft
registration if schedulers are involved. Indeed it implies updating the
scheduler which is not do-able for them.

In this commit we sudo the update of schedulers, as this is a technical
object and access is granted through registrations.

Related to Task ID-2414658
COM PR odoo/odoo#68158

X-original-commit: 73d09268922a7d242af85e36a3d81ed25ab4ca33
2021-03-19 18:38:30 +00:00
Thibault Delavallée 7a9eba403a [FIX] event: do not autocommit when running event mail schedulers in test mode
Otherwise it creates a lot of issues in your tests and database. Always avoid
that kind of error-prone statements in testing mode.

Related to Task ID-2414658
COM PR odoo/odoo#68158

X-original-commit: 3ad9126375e74071fec47f402f1fc63f98b755b6
2021-03-19 18:38:29 +00:00
Damien Abeloos 498eb0cfed [IMP] event: improve the event form editor and update the tour
* In the Communication tab, prevent inserting multiple duplicate lines
  upon switching template.
    - Before, when the user was switching between templates, the lines
      introduced with the last template were not removed, and the amount of
      lines only kept increasing.
    - Now, only the lines that are linked to a registration are kept

* In the Tickets tab, prevent inserting multiple duplicate lines upon
  switching template (Ticketing) if there was already tickets linked to a registration.
    - Same problem as in the Communication tab, multiple lines could be introduced.
    - Now, only the lines that are linked to a registration are kept

* Add 2 tests (compute mails and tickets) to ensure those behaviors are properly
  maintained in future updates. As the issue occured only in a non-saved Form when
  switching event_type templates, the tests are a little low level (since we have
  to check the computed results directly in the Form).

* Remove the last 2 steps of the event_tour :
    - They are a bit out of scope and they break the rythm (better to end on a high note)

Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
2021-03-03 12:24:55 +00:00
nounoubensebia b3d5ce3f5f [IMP] event(_sale), website_event_track: apply some UX refinements
this commit aims at refining the UX for events, notably:

- create a helper for the magic button on the event_track form, because without
  this the user won't be able to understand what the button does.

- on stage update, the kanban state will be automatically set to "gray"
  beacause when changing stages it does not make sense to keep the previous
  kanban state especially when it is set to "green" or to "red".

- make the cost of the event registration product demo data lower then the sale
  price as it is not normal to have a sale price lower then the cost.

- change the style of the "discover all our events" marketing link in the event
  reminder email template in order to make it pop a bit more for the user as
  this is an important link

Task-2451125

closes odoo/odoo#65613

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-03 13:54:40 +00:00
Thibault Delavallée adedada349 [FIX] event: fix seats_limit and configuration stored editable computed fields compute method
RATIONALE

Stored editable fields receive their values either from compute either from
user input. If a user input is given to create / write compute method is not
called. If multiple fields are computed through the same method giving one
field value discard call to compute method and other fields are not called.

SPECIFICATIONS

Split ``_compute_from_event_type`` compute method so that event template
configuration  related fields are independent.

Fix seats_limited being computed in sevearl method which should not occur.

LINKS

COM PR #65688
Task ID-2455165

X-original-commit odoo/odoo@3c09e86b4e

X-original-commit: ddc4ade6ad81c63efebd848ec56d197cd18e8041
2021-02-11 12:41:48 +00:00
Thibault Delavallée 6986faf533 [FIX] event: split stored editable computed fields compute method
RATIONALE

Stored editable fields receive their values either from compute either from
user input. If a user input is given to create / write compute method is not
called. If multiple fields are computed through the same method giving one
field value discard call to compute method and other fields are not called.

SPECIFICATIONS

Split ``_compute_contact_info`` compute method so that partner related fields
are independent.

LINKS

COM PR #65688
Task ID-2455165

X-original-commit odoo/odoo@dfc319f584

X-original-commit: c251048cfead27d12117557fe4b6601bef39e8e1
2021-02-11 12:41:47 +00:00
nounoubensebia 9c4c953d00 [IMP] [website_]event[_sale|_track]: improve various event views & tickets deletion
Improve various event views, notably:

- Display ticket description on frontend even if there is only a single ticket
- Do not display search count on frontend agenda page when there is nothing
searched
- When performing a search, only check the text content of the track HTML
elements and not the entire HTML content, otherwise it would lead to incorrect search
results

In addition, we now also display an human readable error message when the user
tries to delete tickets that are linked to registrations.
This will help identifying the problematic tickets and remove the associated
registrations if necessary.

Task-2427778

closes odoo/odoo#64187

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-27 14:04:05 +00:00
Aurélien Warnon 9622ffe442 [FIX] event: make ticket sale start date inclusive
This commit fixes the ticket sale start date to be considered inclusive.

Indeed, before this commit, if the sales of a ticket starts on the 1st of
December, people arriving on the website at that exact date will NOT be able to
buy tickets although they should be. They will have to wait for the next day to
be able to buy tickets.

A small test was added to ensure this behavior.

Task 2415917

closes odoo/odoo#63685

X-original-commit: ea6952fd7ec881b79a7294c40427ce9966997e66
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-12-22 12:01:05 +00:00
Thibault Delavallée cf98a525b7 [MOV] website_event_(track_)exhibitor: FUUUUSION !
RATIONALE

Events often have sponsors displayed on their front page. This should be
a real standalone feature of Online Event application. However currently it
cannot be used without tracks managements

PURPOSE

Purpose of this task is to allow to use and display sponsors on an Event front
page without using tracks. Moreover online and chat capabilities should be
part of a sponsor feature, located within website_event_exhibitor module.

SPECIFICATIONS

Merge website_event_track_exhibitor into website_event_exhibitor and remove
dependency on website_event_track. That way all features related to sponsors
are now located within website_event_exhibitor.

LINKS

Task ID-2326433
COM PR odoo/odoo#61781
ENT pr odoo/enterprise#14752
UPG PR odoo/upgrade#1931
2020-12-04 07:49:30 +00:00
Victor Feyens 8016591353 [IMP] event(_*): support batch creation
See merge commit for more details.

Task ID-2330149
COM PR odoo/odoo#61246
ENT PR odoo/enterprise#14561
2020-12-03 10:19:04 +00:00
Thibault Delavallée bf242ba1dc [FIX] event: allow de installation of all track submodules at once
Website event track module is an advanced event module that is required notably
in some sub modules: live, quizzes, exhibitors.

When unchecking Schedule & Tracks in event settings, submodules checkboxes
are hidden. It means that currently you may uncheck module_website_event_track
while still keeping sub modules (_track_live, _track_quiz, _track_exhibitor)
checked. When saving, modules are uninstalled, then installed again if one
of sub module is still checked.

In this commit we add an onchange so that unchecking track also unchecks all
its sub modules to effectively remove them all.

Task ID-2389569

closes odoo/odoo#62027

X-original-commit: 29f12da08dbbe6037e530dcae9cf570b71894136
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-23 08:02:44 +00:00
Paul Morelle 75280cf00e [FIX] event: avoid too large prefetching of event.mail
The prefetching engine wants to prefetch all the registrations to all
the events of all the schedulers, which may make a lot of data.

If the autocommit is on, then all this prefetched data is discarded at
each loop.

This commit limits the prefetching to each scheduler, so that we avoid
prefetching the data unnecessarily.

closes odoo/odoo#62052

X-original-commit: 904a46f28cb64e3bd51c40dc364b256d434d1c93
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-11-19 20:25:10 +00:00
Martin Trigaux c59c10f1bc [FIX] *: correct typos and bad English
Courtesy of translators
Reexport .pot of modified modules

closes odoo/odoo#61010

X-original-commit: 62a18bdb372e234107fd2099a2df5f9e3a442c96
Related: odoo/enterprise#14489
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-29 19:23:41 +00:00
Thibault Delavallée fa11872330 [FIX] event: split unstored / stored fields computation
Otherwise computing unstored fields forces to compute all other already
stored fields. When being in a high charge context this may have a big
impact on DB use.

Task ID-2351463

closes odoo/odoo#59845

X-original-commit: fbde9dd183472237f12014315f063af736950b6c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-13 11:02:17 +00:00
Thibault Delavallée 4bbb36bd7f [IMP] (website_)event: ease configuration of Online features
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95b and odoo/enterprise@1472202

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

Allow to configure Menu CTA button on event from event_type, like other
frontend related menus and buttons.

Add settings to ease discovering and installing sub event features like
  * meet;
  * exhibitor;
  * live mode;
  * quizzes;

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
2020-08-21 17:30:13 +00:00
Thibault Delavallée d697966585 [MOV] (website_)event(_online): move tag color field to event
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

Move event.tag color field from website event online to event. This field is
part of standard event models.

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
2020-08-21 17:30:13 +00:00
Martin Trigaux 6156f98288 [FIX] *: adapt action content retrieval
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.*
2020-08-17 09:09:02 +00:00
Thibault Delavallée 785d98bfbe [FIX] event: fix event creation with demo tickets
PURPOSE

Prepare Event Online support by providing fixes and preparatory cleaning
commits.

SPECIFICATION

Currently tickets demo data are not correctly created as they mess up with
automatic ticket computation from event_type configuration.

Solution is to flush event creation. It means tickets default configuration
is computed. Afterwards tickets are created in demo and avoid clashing with
the compute in cache.

LINKS

Task ID 2289148 (Event Bugprovements)
Prepares Task ID 2252655 (master Online Event task)
Prepares Task ID 2283796 (Event B2Basics)
PR #53944

X-original-commit: 6b5ec74b3d9bc008c95a92e7fa954675ae506d1a
2020-07-24 06:54:35 +00:00