Commit Graph
8 Commits
Author SHA1 Message Date
Olivier Dony 79bb85364a [FIX] website_event_exhibitor: avoid useless image processing
The `image_256` field is computed (not stored) based on a dynamic resize
of the stored `image_512`. When testing for the existence of an image
value, the stored field should be used, to avoid processing the image
and resizing it, then discarding the value immediately.

closes odoo/odoo#77303

X-original-commit: 416647da28876ffd159c54df8ae986854c2cb8ca
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-28 10:53:24 +00:00
Thibault Delavallée 242ffe2f24 [IMP] website_event_*: simplify menu definition code
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
2021-07-07 08:27:54 +00:00
Julien Banken e17e07030d [IMP] website_event_exhibitor: use a POST method to set the tag filters
PURPOSE

It has been reported that the page showing the exhibitors is slow because of the
partner table used behind the scene. It turns out that the page can generate many
links for the filters which can trick the crawlers to explore them all. As the
page is slow, the crawlers can put a high pressure on the server by exploring
those links.

SPECS

- Use a POST method to set the tag filters.

By using a POST method, the page will not longer generate links and the crawlers
will no longer explore them. This technique is actually more reliable than simply
defining a `rel="nofollow"` rule on the links.

LINKS

Task id: 2466072

closes odoo/odoo#68192

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-05 07:46:49 +00:00
Thibault Delavallée 9a479f5ef6 [IMP] website_event_exhibitor: improve sponsor type management
Choose lowest sponsor type as default when creating a new sponsor. Purpose
is to avoid being blocked by required fields. Choosing the lowest available
sponsor type allows to ease discovering the feature without breaking any
feature.

Also set a default sequence when creating a sponsor type to avoid jump
effect on list view: always send new sponsor types at the end.

Also set default ribbon as no ribbon to avoid a "void" entry in ribbon style
when creating new sponsor types.

Task ID-2558875
PR odoo/odoo#71787
2021-06-17 11:07:09 +00:00
Olivier Dony 3b383f41f7 [IMP] website_event_exhibitor: speed up sponsors retrieval
The filters for sponsor countries works by adding a domain term on
`partner_id.country_id`. Currently this is evaluated by the ORM by first
searching for all partners in those countries, and then substituting the
IDs in the final query (`partner_id in <ids>`).

On large databases with many partners, this makes the filtering really
slow (e.g. 3 seconds with 1M partners), even though only a few sponsors
actually match.

From a security standpoint, most of the data on the linked partner is
already available on the sponsor through related fields, and those
partners are only visible when they are already published anyway.
Besides, the calls in `_event_exhibitors_get_values` are performed
in `sudo` mode.

It should be noted that `res.partner.country_id` is not currently
indexed, and doing so helps marginally: the query goes from 3000ms to
800ms. It is still much slower than with `auto_join`, which makes it
go down to about 1-2 ms on the same dataset.

Indexing `country_id` does not help make the `auto_join` version faster,
as it only requires the primary key index to find the records.

closes odoo/odoo#66692

X-original-commit: b5246315875dfad151fcb23936499750e0f1f42a
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-02-23 13:14:12 +00:00
Thibault Delavallée 433304ae15 [REF] website_event_exhibitor: improve upgrade of sponsors to (online) exhibitors and back2basics them
PURPOSE

Improve sponsor management, especially when dealing with publication at
sponsor level, exhibitor level, or exhibitor using chat (jitsi).

SPECIFICATIONS

Introduce a new category field containing sponsor, exhibitor or online
exhibitor. Meaning is

  * sponsor: display as a sponsor (sponsor cards at the bottom of events).
    No publish management is done at sponsor level: a sponsor is always
    displayed in the sponsor widget;
  * exhibitor: display as a sponsor in sponsor cards. An exhibitor is also
    displayed in /exhibitors page and allow publish management. Also allow
    to edit description as it is used in front-end page view of exhibitor;
  * online exhibitor: same as exhibitor and allow to configure jitsi (online)
    capabilities. It also activates display of jitsi in frontend;

An exhibitor would be a sponsor that has a physical stand but no online
support. Online exhibitors hold a jitsi room to chat with online visitors.
Also add field in kanban view.

In frontend rename "Connect" to "More info" when exhibitor has no online
capabilities. That way we don't connect with an exhibitor that has only
a published description.

SPECIFIATIONS: B2B

Clearly separate sponsorship levels (gold, silver) from exhibitor type
(sponsor, exhibitor, online). Propagate this new naming through views and
menus as well as frontend filters.

Reword sponsor form view, notably to have a clean 2 column display. Left
column holds customer related information. Right column holds event and
sponsorship information.

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
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
Thibault Delavallée f3356904b6 [MOV] website_event(_track/exhibitor): move sponsor model directly into Online Exhibitors
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
2020-12-04 07:49:30 +00:00