PURPOSE
Be defensive when dealing with email fields, notably when having multi-emails
or email field containing an already-formatted email.
SPECIFICATIONS: MAIL COMPOSER IN MAILING
When using the composer with a mailing, it currently skips recipients whose
email is a multi-email due to the strict usage of 'email_normalize'.
We can improve multi-email support by effectively checking for the first
email found, using the "less strict" mode of normalize. It means more emails
are detected as valid, and therefore sent.
Due to lower support of multi-emails when sending emails, this even allows
to send multiple emails as all emails are mailed.
SPECIFICATIONS: DEFAULT RECIPIENTS
Mailings are generally done using default recipients, aka using a model method
that returns the people to mail: customers ('partner_id'), customer emails
('email_from'), specific implementation, ...
This is implementation using '_message_get_default_recipients' that returns
'partner_ids', 'email_to' and 'email_cc' that are then used in the mail
composer to generate final recipients.
In this commit we better handle the content of email fields to avoid issues
with multi-emails. For that purpose we correctly split the content of those
fields. We now have several 'email_to' for records having multi-emails instead
of a single badly-formatted 'email_to'.
Task-2612945 (Mail: Defensive email formatting)
X-original-commit: odoo/odoo@4a0d87d44f
Part-of: odoo/odoo#134934
PURPOSE
Be defensive when dealing with email fields, notably when having multi-emails
or email field containing an already-formatted email.
SPECIFICATIONS
Post-message hook is used in various apps to link records to a newly created
created partner. This is the case notably when used with a template as it
creates partner on the fly based on emails to always handle partners.
We now check either the complete 'email', either the normalized version of
it to avoid comparison issues with multi emails and formatted emails. As
'email_normalized' now supports multi-emails by storing the first found one
it helps finding the partner.
Task-2612945 (Mail: Defensive email formatting)
X-original-commit: odoo/odoo@e5ad9e0371
Part-of: odoo/odoo#134934
Steps to Produce:-
- Install `Advanced Events`
- Go to ` website` then `Configuration`
- Open `setting`
- Then change favicon and Select svg type file and click on save
- Traceback is here
Cause :-
- The traceback occurs when an SVG image is passed to the ImageProcess method.
In this scenario, the method sets the image as false, and then attempts to
access its size, resulting in the traceback
Fix :-
- The issue has been resolved by implementing a condition check for the image
before accessing its properties. This ensures that the image is valid before
trying to retrieve its size, preventing the traceback from occurring.
sentry-4199175498
closesodoo/odoo#127958
X-original-commit: ebb1e89b367dced4a2157751de12a53bf41ae400
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
*: account, event_booth, gamification, hr, project,
website_event_track, website_hr_recruitment, website_slides
HTML fields that appear in the front-end can be modified using the
website editor. Some of them are sanitized in a way that breaks the
behavior of snippets that can be dropped within them.
This commit adapts the sanitization of those HTML fields so that the
snippets behave as expected.
opw-3267589
closesodoo/odoo#126708
X-original-commit: 7fd28afaf3e45cafbef80b69aa45c58b31fb3de6
Related: odoo/enterprise#43311
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
*: website_event{_meet}{_track}{_track_live}
Purpose
=======
Improve event related module UI
Specifications
==============
- The reporting fields, the chat room and the participant count
of the meeting room form should not be showed while the record
is not created.
- Rewording on event track "Button appears" and "Color" field.
- Remove unnecessary helpers in event track form.
- Remove "Wishlisted By" stat button when the count is equal to 0.
- Add many2one widget avatar on lead rule "Saleperson" field and
event track "Responsible" field.
- Add placeholders in event booth form view, event location
tree view, event tags categories form view and event stages
form view.
Task-3280602
Part-of: odoo/odoo#119321
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.
The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.
closesodoo/odoo#114533
Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
RATIONALE
Improve usage of composer in comment or email mode: support batch-posting in
comment, support more configuration from templates, improve global model.
SPECIFICATIONS
Change 'auto_delete_message' into 'auto_delete_keep_log' that has the inverse
meaning. Indeed it is unclear what 'auto_delete_message' really does. It is
used when automatically removing emails sent through mass mailing, to know
if message created through inherits are kept or not. Purpose of keeping them
is to have a log on the document. Deleting the message therefore removes the
log.
In this commit we change the meaning to something positive, keeping logs being
clearer when choosing which option to activate. Functional usage of the field
itself does not change with this commit.
Task-3035101 (Mail: Support batch-posting from composer)
Part-of: odoo/odoo#99482
RATIONALE
Purpose of this commit is to cleanup main post helpers and have a more easy
and understandable way of calling them.
SUMMARY
We now have two main API methods, based on business flow: either posting
on documents, either sending a mass mailing. Indeed those two flows are
different
* post: create message, then launch notification process by taking into
account subtype, followers, ...
* mail: create mails in batch with recipients being based on template or
given partners. No notifications is involved, only maybe traces if a
mass mailing is linked
Delegate QWeb rendering to the render mixin (i.e. _render_template_qweb_view)
in order to have a single point to forge evaluation context and re-use
existing rendering code.
SPECIFICATIONS
Main API helpers are now
* ``message_post_with_source``: (batch) post on records, using an ir.ui.view
(given a record or its xml id) or a mail.template record (given a record or
its xml id). When using a template, a composer is called to post on each
record (as batch post is not yet supported). When using a view, a direct
call to message_post using the rendered bodies is done, one record at a
time.
* ``message_mail_with_source``: send a mass mailing on records, acting like
invoking the mail composer in mass mode. Same arguments are valid, either
a reference to a view, either a reference to a mail template.
Other helpers are
* ``_message_log_with_view``: (batch) log on records, using an ir.ui.view
to render the body using QWeb (no notification process);
* ``_message_log(_batch)``: (batch) log on records (no notification process);
* ``message_notify``: notify partners on records (creating notifications
specifically for some people while message itself is not displayed in
chatter);
Code migration
* ``message_post_with_template`` in "mass mode": use ``message_mail_with_source``
and set the template record as source;
* ``message_post_with_template`` in "comment" mode: use ``message_post_with_source``
and set the template record as source;
* ``message_post_with_view``: its main usage was to post on a document, in which
case it generally can be replaced by ``message_mail_with_source`` using
the view reference as source;
Task-2710804 (Mail: Clean MailThread Posting API)
Part-of: odoo/odoo#99482
RATIONALE
Purpose of this commit is to be explicit in subtype chosen when invoking the
message composer / calling message_post. As default value may not always be
clear, better be explicit in case the composer default value changes.
SPECIFICATIONS
Add explicit references to subtype when it is not obvious what will be the
final subtype, notably when using helpers (post_with_view or template which
uses the composer that is not crystal clear in its subtype management).
In this commit we also add support of XMLID-based subtype when invoking the
composer. A ``default_subtype_xmlid`` context key is transformed into a
``default_subtype_id``, to be used notably in JS where we cannot easily
use a ``ref``-like statement. Post API now also supports 'subytpe_xmlid'
argument allowing to give the xml id and ease calling the methods.
Use ``_xmlid_to_res_id`` to get directly the ID of subtypes in order to
avoid useless queries from ``ref`` that does an exists.
Also remove useless values given to post API, notably author_id that is by
default the current users' partner.
Task-2710804 (Mail: Clean MailThread Posting API)
Part-of: odoo/odoo#99482
This commit adds a `sequence` field in `event.track.location`, allowing event
managers to organize their event location as they want in the "Agenda" page.
To allow re-arrangement of the locations a bit more visible and easy, this
commit adds handle widget on track locations tree view, and removes the debug
group from the menu "Events > Configuration > Track Locations".
To match the order on agenda page and on the back-end, the same ordering
is applied at model level as well.
taskID-2942634
closesodoo/odoo#97763
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
fields having a tooltip in the future UI.
4/ some cleanup of existing messages too
The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX
closesodoo/odoo#97279
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
* im_livechat, test_event_full, website_blog, website_crm,
website_event, website_event_track, website_event_track_quiz,
webite_livechat, website_sale
There is 6 main changes in this commit:
1. Using raw SQL Upsert instead of the ORM methods. While raw SQL should
generally be avoided, it makes sense for such a low level behavior which
is impacting every flows.
Indeed, tracking visitors is a generic behavior done on all pages and
controllers. It is important to optimize it to reduce processing time
and SQL Queries.
Benchmark of that change alone:
> Rendering a tracked page improves from ~19.5ms to ~17ms (using `ab`
with 1000 loop) and the requests involved in the tracking process are
reduced from 8 SQL Queries to 3:
- 1 request to upsert the visitor
- 1 request to fetch the visitor data
- 1 request to add the tracking record
2. Adding in that upsert query the `visitor.track` insert, creating both
records in one go, bringing the query count from 3 to 2.
3. Refactoring of the `parent_id` behavior that was introduced in stable
with [1]. The purpose was to keep track of multiple visitor linked to a
same user to merge the tracking together. Especially useful for tracking
a same visitor on different devices (when logged in).
Only one visitor was kept as active, others would be archived and their
tracks would be set/moved to the main partner.
Removing those duplicate visitor was not possible because those archived
duplicated visitor were holding the devices notification push token.
Since [2], those token were moved to their own table, all related to the
main visitor.
We can then now safely remove those duplicate visitors after merging
their track to the main visitor. Thus, the `parent_id` field is no more
useful. Removing it removes a layer of complexity.
Note that thanks to this part, the `active` field can also be removed.
4. Deeper functionnal change, inspired from Plausible: The access_token
is no more stored in a cookie but is the result of a hashing method
based on <IP Adress, User Agent>.
The reason behind that change is that, in an upcoming refactoring,
sessions won't be stored anymore unless absolutely needed (login, add to
cart..). It will also ship a no cookies policy, trying to get rid of all
cookies.
This change is bringing some functional changes:
- Since the IP is included in the hash to generate the token, it means
that:
A. If an anonymous user switch IP (eg from 4G to wifi), it is
considered as a new visitor.
B. If 2 anonymous users with the exact same user agent (same browser,
same browser version, same exact os or phone) are on the same IP,
those will be considered as the same visitor.
- Since the request host is not included in the hash, it means that
visiting a DB from 2 differents URLs (domain and/or ip) on the same
device and same browser will result in a shared visitor.
It shouldn't imply any issue as this is A. not wrong and B. mostly
used for tests.
As all this is only related to non logged in user, it shouldn't be a
real issue as anonymous visitors are not supposed to be meant to be
business critical, even if we use them for "a bit more" than simple
analytics data.
5. The access_token is now replaced by the partner_id once the user logs
in, so:
- We don't need to either search on the partner_id field or the
access_token field (depending if the user is logged in or not), we can
only use the access_token row/field to do both.
- On logout, everything works out of the box as the access_token will be
regenerated since there is no partner_id anymore.
- On login, if an access_token matches the user's partner_id, that
visitor is returned.
If there is no such token, a new visitor is created for that partner_id.
In both 2 cases, tracks are moved to that visitor and the anonymous
visitor is removed.
- We can remove the code that was in charge of checking if the
access_token / visitor cookie was wrong (coming from another user eg,
different user login on same device). Indeed, such collision is not
possible anymore as the access_token automatically match the logged in
user.
- We can remove the code that was in charge of checking if the
access_token / visitor cookie was wrong (coming from a logged in user
while the current visitor is not loggedin). Such collision is not
possible anymore as the access_token is (re)generated as an anonymous
token (hash) when not logged in.
6. There is no more check to prevent a track to be created if there was
already a track for that URL in the last 30 minutes.
While this can easily be re-introduced (one CTE on the upsert), it was
adding ~100ms (from ~20 to ~110ms) to the request on a big database as
Odoo where there is ~100 millions tracks and ~100 millions visitors.
It has been validated that it was not a real issue as it is not
fundamentally wrong. If a visitor visited 20 times a product or a
specific page in that short amount of time, you might want to know that
because the user is most likely interested by it.
Changes (1+2), 3, (4+5) and 6 are all independant from each other and
could have existed on their own.
[1]: https://github.com/odoo/odoo/commit/c6b8a44b970a46dcd87a4e2cb1ad52fa340b209f
[2]: https://github.com/odoo/enterprise/pull/16781/commits/f75090fe8b42484e89e933976e8441d2f5eb9415
task-2867045
closesodoo/odoo#87857
Related: odoo/enterprise#28004
Related: odoo/upgrade#3566
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
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>
This commit is the community counterpart of the enterprise commit that
consolidates push tokens on website.visitors.
We now don't need to keep wishlisted tracks on children records of a
website.visitor and we can keep the whole wishlisted tracks list consolidated
on the parent only.
This allows some code cleaning and some simplification as well as a few
performance improvements.
Task-2429652
Part-of: odoo/odoo#65113
PURPOSE
Visitors are useful in terms of marketing analysis but they can bloat the
database really quickly if you have a lot of traffic on your website.
This commit aims to relieve the database by fully deleting inactive visitors.
SPECS
On an active website, you can easily reach hundreds or even thousands of
visitors per day.
While active visitors are useful for marketing purposes, inactive ones were
archived after a period of inactivity (i.e: not connected for X days in a row,
where X is configurable as a parameter and 30 by default).
But archiving visitors is not really useful either.
We don't see any specific cases where you would want to restore some visitors.
That means we are better off unlinking the visitors completely to save database
storage space.
We want to make exceptions and avoid deletion of inactive visitors in some
cases:
- When they are linked to a partner (meaning most likely linked to a
registered user)
- When they are linked to leads
- When they are registered to events
Several tests were added to ensure that leads matching these conditions are not
unlinked.
We also took this opportunity to enforce the "_link_to_visitor" rules in those
tests to make sure that:
- When visitors are linked, the leads are merged into the main visitor
- When visitors are linked, the event tickets are merged into the main visitor
- When visitors are linked, the wishlisted tracks are merged into the main
visitor
This is also preliminary work for a commit that will move the push_token of
website.visitors to a separate table.
That will in turn allow us to link the push_tokens within the
"_link_to_visitor" method and delete the linked visitor instead of archiving
it.
LINKS
Task-2410217
Part-of: odoo/odoo#65113
The concept of 'parent_id' on website.visitors was introduced in the saas-13.3
stable while implementing the "event online" feature:
However, it should have been part of the website module from the start since
it's a 'global' concept that does not depend on events at all.
See #53540 for more details.
This commit aims to clean the code by moving the field to the website module,
which allows a nice cleaning of associated overridden methods as well.
Along with that, we move the website.visitor demo data from the event module to
the website module, allowing a fresh install of website to showcase some of our
visitors feature.
We also took this opportunity to do some minor improvements in the visitors
kanban view in order to make relevant information more visible.
Task-2429652
Part-of: odoo/odoo#65113
Avoid to base64 encode, then decode to process assets and images for a ~25% speed improvement.
Change image processing tool to work on images, rather than base64 encoded strings.
Performance is ~25% faster on assets & images:
/web/assets/...frontend.min.css: 13ms to 7ms, base64 enc/dec: 2 -> 0
/web/image/XML_ID: 10ms to 8ms, base64 enc/dec: 3 -> 0
/web/image/res.users/2/avatar_128: 40ms to 20ms, base64 enc/dec: 6 -> 2
closesodoo/odoo#82851
Related: odoo/enterprise#23537
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
After some analyze on a lot of customer databases, seems like most of the time
their are performance probleme, and big store, it is due to a lot of big file
uploaded without reason. E.g. barcode, photo, ... a small one will be enough.
Now, we decided (in stable) to auto resize these pictures to 1920x1920px
by default and compress it with a quality of 80 when the source is bigger.
You can bypass this behaviour in your specific use case,
using a context key: 'image_no_postprocess' set to True.
You can disable the resize (and quality implicitely)
using an icp: 'base.image_autoresize_max_px' set to '0'.
You can change the default resize (1920x1920) format using an icp:
'base.image_autoresize_max_px' set to '<width>x<height>' (e.g. '1024x768')
You can change the default quality (80) using an icp:
'base.image_autoresize_quality' with a value between 0 and 100 where 0 skip it.
You can change the type of file that will be post process using icp:
'base.image_autoresize_extensions' (subtype of the mimetype comma separated).
Api of image has not be changed in this commit, only refactored to allow to
work with image directly without the need to encode/Decode in base64 the raw.
We decide to keep 1920x1920 by default instead of 1080p to avoid to resize
portrait picture in 1080px and stay consistent with field image_1920 that
return a 1920px image for width or height whatever the orientation.
+ fix some lint diff for ci style in master
closesodoo/odoo#78556
X-original-commit: d9ce0507960f247e1187baf7bd8399f90be237aa
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
In the track stage model, the fields 'is_accepted' and 'is_done' of the
track stage model are not self-explanatory enough. The user may not know
that those fields will have an impact on the visibility and the accessibility
of the tracks in the frontend. We will then rename those fields and update
their use to make it clearer.
Rules are now
* a published track is always displayed in agenda, tracks list and page
view, whatever its state;
* a track in a 'is_visible_in_agenda' stage (replacing 'is_accepted') is
always displayed in agenda and tracks list. Its page view access is based
on ACLs: aka: published = everyone, unpublished = for event users only;
* a track in a 'is_fully_accessible' stage (replacing 'is_done') is
automatically published when entering this stage, allowing its full
display
This means that
* tracks may be displayed in agenda and tracks list to public without giving
access to their page;
* easy way to publish tracks at once is achieved by moving them in batch in
a fully accessible stage;
* early-disclosure of tracks is achieved by publishing them manually whatever
the stage;
* easy removal of track page view is achieved by unpublishing them manually
whatever the stage;
Page view still relies on ACLs, and therefore on published flag automatically
set when entering "fully accessible" stage.
task-2504216
COM PR: odoo/odoo#69585
UPG PR: odoo/upgrade#2408
In order to make the kanban view more customizable, we will allow the
administrators to give a custom legend on the event track stages. With
the custom legends, the employees should be able to find their way more
easily especially if the company uses its own internal processes.
The custom description of the track stage will appear in a tooltip when
the user hovers the corresponding kanban column and does not move for a
few seconds. It can help people understand the role of each track stage.
In order to ease track management, tags are now searchable directly from
track view.
task-2504216
COM PR: odoo/odoo#69585
UPG PR: odoo/upgrade#2408
Now that all menus are managed the same way using a menu type and
clear definitions we can set all menu type definitions to override
_get_website_menu_entries. This is just some code cleaning and
has no functional impact.
Task-2577079
PR odoo#72411
In website_event some event-specific frontend menus are not linked to
``website.event.menu`` like track or exhibitor sub-modules menus. This
comes from initial implementation of ``website.event.menu`` that was
available only for ``website_event_track``.
Using ``website.event.menu`` eases menu management as it allows to have
an object making a link between the event and the website menu. Notably
when checking / unchecking in backend submenus it eases management.
It also eases management when people manually edit menus from frontend
as otherwise we have to manually manage ``ir.ui.view`` based on some
naming manipulation.
Task ID-2577079
See odoo/odoo#72411
Bug
===
1. Create an event which allows track proposal
2. Follow it and subscribe to "New Track"
3. Log in in incognito and submit a proposal
The email is not sent, because it's sent as the public user, which has
no email address set. And so it the 2 system parameters
<mail.catchall.domain> and <mail.default.from> are not set, we can not
know which email address used to send the email.
Note that this bug also occurs if you create a track with a user without
an email address set.
Task 2510181
closesodoo/odoo#70627
X-original-commit: 45ffab08a7c1dacc70d331077198f92884b53646
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit slightly reworks the "event_track_template_new" template to format
it a little better and get rid of unnecessary blank sections.
The "subject" param was removed from the "message_post_with_view" call as we
don't want the chatter to contain the name of the track twice.
Indeed, since #61570, the "subject" is displayed in the chatter if it differs
from the thread name (which is the case here).
This causes a small regression for emails that will state "Re: EventName" in
their subject instead of the track name, but it's deemed acceptable to have a
nicer chatter message.
We also remove the description of the "mt_event_track" mail.message.subtype as
it's only used with a custom template and is redundant with that template's
content.
Task-2496444
closesodoo/odoo#68864
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
This commit adds several minor visual improvements to the event.tracks
frontend and backend views as well as a few quality of life changes to
ease usability.
SPECS
- Add "hide and show" feature for tracks
In the event homepage, all the tracks of the selected event will be
displayed. As the tracks are grouped by day, some sections will only
contain tracks that have already taken place. If there are a lot of
tracks, it might be better to fold these sections to reduce the payload
of the page. That way, the user will be able to see the upcoming tracks
more easily.
With these changes, a new chevron icon will be added above each section.
When the user clicks on it, the user can fold and unfold a section.
By default, the section containing tracks that have already taken place
will be initially folded.
- Add partner tag line
The user may need to know more about the speaker before attending a
talk. The user may wonder: Who will give the talk ? What is his/her
field of expertise ? Where the speaker comes from ? To answer these
questions, we will display: the name, the job position and
the company name of the speaker.
- Add replay suggestion when no suggestion can be provided
When a video ends and no suggestion can be provided, the player will
display an empty cover to hide the Youtube suggestions. With these new
changes, the cover will now suggest the user to replay the video when
no suggestion can be provided.
- Dynamic count down for incoming tracks
When the user accesses a track that will start in several hours, an alert
will indicate the remaining time before the beginning of the track.
Unfortunately, this alert is not dynamic: If the user keeps the page in
a tab and come back later, the alert will not be updated and will display
an incorrect estimation.
The changes address this issue: The timer will now be updated dynamically
as the time goes on. When the countdown reaches 0, the alert will
automatically be removed from the dom.
- Fix links of the agenda view
In the agenda, the title of a track can be a link. When the user hover
it, the cursor of the user will now turn into a clickable hand only if
the track is accessible.
- Remove the default date for the new tracks.
- Set a default duration of half an hour for the new tracks.
LINKS
Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612
X-original-commit: 6804b8a92c03db09c2694150f968d8056492a1d4
PURPOSE
This commit generally improves some of the event application layouts.
SPECS
- Add new rules to handle long text properly.
- Set a maximum height for the dropdown menu.
- Minor margin and padding adjustments.
- Reduce border radius of status badge.
- Remove the rounded corners of the cards.
- Remove the "wishlist" terminology.
- Fix the href attribute of the event name.
- Fix image distortion of the sponsor cards (backend).
- Hide viewer count when there is no viewer.
- Limiting the expansion of the meeting room aside block.
- Various other minor changes coming from user testing
LINKS
Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612
X-original-commit: cfbe1096ec34411a7abe9a9510dc4289e15db1cb
Distinguish and display to the speaker which info is collected by the form
for internal use vs external dissemination. The contact details one wants to
share with the event manager (Private details : contact_phone, contact_email)
could indeed be different from the ones shared to attendees (partner_phone,
partner_email,...). The form in both back-end and front-end is made more
detailed, including more fields. Previously the form could have several
speakers, now only one.
Front-End
- Track proposal form changed, now includes tags, contact / speaker info...
- Track name and description are mandatory fields
- User can select (but not create) several track tags from those existing.
This allows categorizing the track in pre-defined categories with format
"tag category : tag name". It requires a select2 widget,
implemented in new file website_event_track_proposal_add_tag.js.
- New tickable section "contact me through different contact" not displayed
if the checkbox is not ticked. If the section is ticked, then the info set
there (contact_name, contact_phone, contact_email) will be added on a new
contact with id partner_id set on the track.
- In both cases (checkbox on/off), if the contact/partner email is the
same as logged user's, uses its partner on form. No contact creation needed.
- Improved / dynamic error display on form submission. If the form is valid,
it resets after submission.
- New widget in website_event_track_proposal.js:
- The partner_name is propagated on contact_name on input but editable.
- When the optional section is checked:
- The contact_name is made required.
- The user must at least enter a contact phone or an email. The email
is normalized but any phone format is accepted, since the choice of
country is not resolved (e.g. geoip not always relevant). Could be
improved with international phone number widget, see COM PR #34725
Back-end: following changes are done to ease contact creation and form completion
from back-end, as well as reaching the speaker from chatter
- On the form:
- If created on the fly from M2O (entering a name and using "create ..."),
the new partner will use default values contact_phone and contact_email.
- Once the contact is set (partner_id), contact_phone and contact_email
are set to readonly since they change according to the partner.
- When setting or changing the partner: this will fill all the form fields
with new available partner data to ease the flow, but only the empty ones
(this prevents losing previously entered information).
If partner is a company, company name is set to the name of partner.
- All fields are editable in the speaker section.
- Exception thrown if no contact mean available when supposed to.
- On the chatter, about contact creation and message subscription:
- From contact creation through suggested contacts.
- If the partner is set but is not in the followers, it is suggested
- If no partner is set, then there is at maximum one suggested contact
from track data: using contact_email if there is one, partner_email
otherwise. This priority serves main commit purpose. The user can
create and edit a corresponding contact if the address is not linked
to a partner. It will then be searched for and set on track.
Modifies tests in test_track_partner_sync. Before, partner fields on track
would be erased by customer's ones. Now, they are updated only if empty.
Contact fields are erased by customer's ones if set. tests changed accordingly.
Task ID - 2329406
COM PR odoo/odoo#60847
UPG PR odoo/upgrade#2346
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
A canceled event track must be unpublished.
opw:2485928
closesodoo/odoo#68236
X-original-commit: c0aaf2412e586e038cf81646567268607e789f71
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Issue
- Install 'website_event_track' module
- Go to settings and remove website favicon
- Save
Traceback is raised.
Cause
Trying to create image from favicon for app_icon,
but favicon not set anymore.
Solution
If no website.favicon, set website.app_icon to False.
opw-2451934
closesodoo/odoo#67367
X-original-commit: dfe1a6af4b7b740540270d38581f64aa37616222
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#65613
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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_parnter_info`` compute method so that partner related fields
are independent.
LINKS
COM PR #65688
Task ID-2455165
X-original-commit odoo/odoo@12d7aae9ee
X-original-commit: 436fb7d7aa339e86753721d3385df4f4517d2d30
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
Move everything related to event.sponsor model from website_event_track
to website_event_exhibitor. Functionally feature should be the same as
before except that we should be able to configure and display sponsors
directly with website_event_exhibitor application without using tracks.
Website_event_exhibitor should also define the sponsor template used to
display sponsors below an event.
LINKS
Task ID-2326433
COM PR odoo/odoo#61781
ENT pr odoo/enterprise#14752
UPG PR odoo/upgrade#1931
The feature was actually not working as expected. It has been fixed,
and a test now ensures it does work as expected. This commit also fixes
some invalid parameters, hopefully nothing critical.
closesodoo/odoo#60429
X-original-commit: 231bdca3f26d96f578503694e5aec062de2317ed
Related: odoo/enterprise#14285
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This commit adds a condition to the algorithm that redirects the track viewers
to another talk when the one they looked at ended up.
The next talk must be still ongoing. It avoids to redirect to a talk that
started less than 10 minutes ago but that is already done.
Task ID: 2344522
closesodoo/odoo#58836
X-original-commit: e047fc2c7f5d2440adce30ce81a2c10a3b133083
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit aim to improve the algorithm to select the next talk suggestion
after a track has ended, in order to support small interact between two longer
talks.
Idea:
- all talks that begin less than 10 minutes before (all at same ordering level
whatever actual time)
- then talks beginning in a near future
Task ID: 2344522
closesodoo/odoo#58701
X-original-commit: 7f1e46331aecdaa4e08828240a495923c251c69f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adds a website-specific and customizable app name for the
Events' Progressive Web Application, configurable through the website's
settings.
Defaults to '<website_name> Events'.
closesodoo/odoo#56564
X-original-commit: 423076ddf1da0fc61d9a18dc19bbbbf900e3dad6
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit fixes glitches when switching menus. Indeed agenda is not correctly
taken into account, meaning it could get duplicated. Moreover track was
constantly coming back as True event when not wanted.
Behavior is: when setting website menu, force it to True, otherwise let users
defined its value. Agenda is part of track menu so fix its declaration in
_track and _track_online methods.
Task ID-2314778 (event online fixes)
PR #56340
PR odoo/enterprise#12589
X-Original-PR #56254
X-Original-Commit odoo/odoo@5821758c4d
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 all content of website event track session to website event tracK. It
was mainly of rewriting of views and can now be safely merged into the base
track module.
Update dependencies accordingly.
LINKS
Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
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 remaining content of website event track online to website event track.
Agenda notably is completely replaced by the new one developed within
track_online module.
Update dependencies accordingly.
LINKS
Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
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
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_trackit.
SPECIFICATIONS
Quickly reorganize some bits of code in website_event_track module to ease
future integration of code from _online sub-modules. It also helps
understanding and finding its way through the module.
Split python files by model: notably event.track sub models inside their own
file to better follow future modifications.
Reorganize templates by main use
* _agenda: agenda view of tracks;
* _list: views of tracks, list-based;
* _page: a specific view of track, page-based;
* move side templates in side files;
* reorganize fields and add separators as this model will soon gain a lot
of fields;
* reorganize controllers to separate them by main use;
LINKS
Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
PURPOSE
Improve and make color management coherent in event models. Notably consider
colorless tags as being used for internal management only, and not displayed
in frontend.
SPECIFICATIONS
Ensure tags without color are not displayed in frontend for both event and
track models (event main page, track display, agenda). Also ensure a default
random color is given when creating tags so that they are displayed by
default.
When a category used as a dropdown menu has no tags to display hide it in
order to have void categories in filtering section.
LINKS
Related to testing of EventOnline
Task ID-2314778
Fwd port of PR #55625
PR #55642
Followup of 69d2513de21c2e80de605f77912a3687b8a79c6d : fix computation of menu fields values to
be more inlined with base menu option (website_menu) + True by default when
activating menus.
Also force update when writing directly on a menu field to ensure coherency
of website.event.menu.
PR #55325closesodoo/odoo#55340
X-original-commit: 19d028aa885d5623ae98b26ad135a1b29c89d5ee
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Track menu was not appearing since 69d2513de21c2e80de605f77912a3687b8a79c6d due to agenda
messing with standard track menu entry. Agenda is not dynamically build like
track and should not have its menu type.
closesodoo/odoo#55282
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
New and improved pages are about to land for online event. However current
menus and pages management is hard to tweak, especially when dealing with
the stable policy of 13.3 .
SPECIFICATIONS
Refactor and improve code about event menu management. Purpose is to
ease inheritance and be able to add menus and pages with less custom code
in sub modules.
Refactor some code, notably
* code dealing with menus to activate and de-activate that is duplicated
for each kind of menu;
* allow to give a menu_type through inheritance in create_menu notably to
support website.event.menu model available in Track app and unfortunately
not in website_event;
* make a somehow generic way of getting fields dealing with menu items
through simple inheritance;
* support sequence to allow ordering of menu entries by propagating the
sequence to website menus;
Behavior in website_event and website_event_track should be the same. Behavior
will be tweaked in other modules through inheritance..
Improve behavior when removing frontend menus
* correctly fetch views (for Introduction / Location) and try to unlink them
to avoid bloating the db;
* update boolean menu fields according to website menu management. Removing
a menu from frontend should be reflected on boolean fields of event;
LINKS
PR #55260
Task ID-2310491 (Event Online Preparation 5)
Part of Task ID-2252655 (Main Online Event task)
Part of Task ID-2283796 (Event B2Basics / Registration Flow)
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>