This commit modifies most of the usages of read_group and uses
_read_group instead. _read_group doesn't join automatically on the
many2one fields when no order_by is specified, making it more performant
when the "name" of the many2one is not relevant, which is the case for
most back-end cases
closesodoo/odoo#84908
Task-id: 2479334
Related: odoo/enterprise#24877
Signed-off-by: Raphael Collet <rco@odoo.com>
Before this commit:
When user tries to create an event meeting room without selecting
'Max Capacity', it throws a Validation Error because 'Max Capacity'
is a required field.
After this commit:
We provide the default value for 'Max Capicity' field on event meeting
room to avoid default ORM Validation Error while saving the record.
Note: Because the 'Max Capacity' is a selection field, displayed with
radio widget, we can't make it required from the view unlike other fields.
Also, in the 'chat.room.mixin', when we create a chat room on the fly from
create method, instead of popping the ROOM_CONFIG_FIELDS, we propagate them
(same like in write method), so that the room being created respects value
selected by user (instead of taking the default one if we pop it).
Task-id : 2448435
closesodoo/odoo#72756
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Convert the override of method `power_on()` to an `@autovacuum` method.
closesodoo/odoo#67178
X-original-commit: f212223305a4d1da0f01f008c3874a72945fcae0
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Community menu field is added in website_event module. It is used in two
inheriting modules, website_event_meet and website_event_track_quiz. There
is no other common ancestor for those two modules.
In website_event, community menu field should be False and not displayed
as it has no real use. Only in those sub-applications it should be
computed like other menu fields, and displayed in event views (both
event and event type for configuration).
PR #56340
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 website event menu model directly into website event. Website event menu
model has been introduced to help dealing with event-specific menus and
website menus. This is some kind of glue to synchronize both of them as people
could either
* update an event (website_menu, website_track) that updates website menus
availability;
* update menus through website that should update event field value and menu
computation;
Having a model introduced in website event track forces to have override and
code split across website_event, website_event_track, and now also in both
_online version of those two as menu management was improved.
In this commit we simplify all this code by moving most of menu management
code in website_event, leaving only business-specific code (fields and their
menus) to sub modules.
SPECIFICATIONS: WEBSITE EVENT MENU
Make type required as we don't support entries without type. Indeed this model
is used to automate menus generation / destruction, and not for hand-made
menus. We therefore set type as required and add a cascade ondelete for
selection.
SPECIFCIATIONS: COMMUNITY MENU
Doing this change allows to define community menu in website_event and re-use
it in website_event_meet and website_event_track_quiz, removing some
unnecessary dependencies. This menu is void in website_event, and displays
either meeting rooms (in meet) or quiz points leaderboard (in quiz), or a
mix of both if the two features are installed.
LINKS
Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#165
SPECIFICATIONS
Slightly improve meeting room model
* set chat room as required. Meeting rooms without chat room make no sense;
* allow to translate room summary. As this is displayed in frontend having
it translated makes sense;
* improve label of reached participants, allowing notably to display it
nicely in backend;
LINKS
Coming from internal feedback while deploying online support
Task ID-2314778
PR #55887
X-original-commit 54bd8281cf94ddee77073cf5d6356d847d08d024
PURPOSE
Ease chat room management, especially when dealing with meeting rooms and
exhibitors in backend: multi edit, avoid name collision, better support of
copy with room names, ...
SPECIFICATIONS
Clean code managing chat rooms: handle most of its management in chat room
mixin. It allows to lessen custom code in website_event_meet.
Improve sanitize heuristic of chat rooms by avoiding name collision. If a
room with a given name already exists, simply increment a counter as suffix.
Improve copy management: when copying from the chat.room.mixin on a record
with a room set, simply propagate an updated room name. As room_id itself
is not kept but a new one is create, it will create a new room with a name
avoiding collisions.
Allow multi edit for event meeting rooms and exhibitors. It allows notably
to publish by batch, and to set exhibitors as having chat rooms by batch.
Give default values for max participants count when creating exhibitors so
that required field has a default value. Otherwise people forgot it and have
to come back on form view to set it. This is due to default value coming
from mixin not being propagated to the form view.
LINKS
Coming from internal feedback while deploying online support
Task ID-2314778
PR #55887
X-original-commit d35d6295ae1b50e9ecb4e57c5e7fb6cdd52c8b27
RATIONALE
Events are sometimes held online, gathering a community. In this merge we
improve Event application to better support full-online events with improved
tracks, wishlists, chat rooms, ...
PURPOSE
Allow the website visitors to meet at online events using chat rooms. Those are
based on jitsi rooms previously added.
SPECIFICATIONS
Define a new model holding discussion rooms, with their target and a publish
management. Inherit from chat.room mixin to enable jitsi-based chat.
Any website visitor can create a meeting room based on Jitsi. Using some
information (name, summary, room size, languyage) anyone can launch a new
discussion topic. This will make a link with a new jitsi room enabling people
to chat. Visitor-community rooms creation can be turned off on event itself.
Meeting rooms can be pinned by the event managers to choose which rooms are
displayed on top. Managers can also duplicate the full meeting rooms if a topic
is popular, or publish/unpublish rooms like usual website records.
SPECIFICATIONS: LIST VIEW
Display a card-based list view of meeting rooms. They can be filtered by
language. When a meeting room reach the maximum number of participants it is
not visible anymore for standard visitors.
The meeting rooms unpinned are cleaned after a certain period of time if there
is no activity in it usign the autovacuum cron. That way we keep a clean view
on the frontend and we keep the important (pinned) meeting rooms.
SPECIFICATIONS: PAGE VIEW
Use the same main content / aside panel display as exhibitors / tracks, to
display the jitsi in the main content. Left panel proposes suggestions of
rooms, based on current one.
When a visitor join a meeting room, we fill the jitsi username with the name
he entered during his registration.
LINKS
Task ID-2252655 (Main Online Event task)
Task ID-2283742 (Community gathering on chat rooms)
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Stéphane Debauche <std@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>