Commit Graph
14 Commits
Author SHA1 Message Date
Julien Banken d369726f6a [IMP] website_event_track: update the track stage visibility logic
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
2021-09-02 07:32:25 +00:00
Aurélien Warnon d63674d989 [IMP] website_event_track: submit track proposals using AJAX
Currently, track proposals are submitted through an HTML form with an "action"
attribute, which requires that the associated route returns a redirect
response.

However, redirecting to a different page comes with its set of issues.
Indeed, when the track is submitted, the user that just submitted the track no
longer has access to it (because it's not published).

In 157a1d77058da97954edc9efba6ab9f43c7d13a2
We attempted to resolve this issue by checking if the partner set on the track
is the same as the partner set on the website.visitor record.
However, this does not handle every use cases since when specifying different
contact information, we create a different res.partner, making the check fail.

In this commit, we rework the track proposal submission to use AJAX instead.
This allows to dynamically show a "success" message while staying on the same
page, removing the need for redirects and "complex" ACLs checks.

While the main goal of this change is to avoid the need for that security
check, it also has a few additional minor advantages:
- Slightly faster UI, as you don't have to wait for a full page reload
- Fewer routes to maintain
- Easier and more thorough validation handling (current code returns a ugly
  error page if validation fails server-side)
- Code makes a bit more sense, as we don't have a template that varies from
  "form" to "success message" depending on the presence of a "track" variable

Task-2618734
UPG PR odoo/upgrade#2722

closes odoo/odoo#74848

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-17 14:28:17 +00:00
Sunil Shrimali 7ff89c188c [IMP] website_event_track: improves ui for unpublished event_tracks
Unpublished tag not shown if track is not accepted, although track is not
published. Unpublished tracks was also visible for portal user. opacity
was not available on tracks, even track is unpublished.

unpublished tag added into event agenda next to 'not accepted', also
added blurry effect and unpublished tag into agenda which is
shows in details page. used normal text in place of badge for
unpublished track, because that red badge is already used by live
tag. Onwards now, unpublished track will not show to portal user.

TaskID - 2346612
2021-07-06 04:44:46 +00:00
Munaf Khan 1c2598b84c [FIX] website_event_track: fixed method not allowed
Currently, while reloading following success page
it return "Method not Allowed".

   * submit track proposal and reload
   * register for an event and reload

this commit fix this error and successfully
reload the page.

closes odoo/odoo#70087

Task-id: 2500573
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-10 05:21:28 +00:00
std-odoo 883f0a3b85 [FIX] event: the registration user should have access to the tickets
Bug
===
The registration users should be able to read the event tickets.

Allow the registration users to see unpublished event record on website
(Jitsi room, sponsors, track...).

Task 2506148

closes odoo/odoo#70615

X-original-commit: 3eef17203661919a067a4f0d8d99c2b3b6fcf233
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-10 14:24:29 +00:00
Julien Banken 0f50285cf6 [IMP] website_event_track[_live]: add visual & usability improvements to event.tracks
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
2021-04-12 10:39:58 +00:00
Julien Banken 98f46907c2 [IMP] website_event[_track|_meet|_exhibitor]: improve various frontend event layouts
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
2021-04-12 10:39:58 +00:00
Aurélien Warnon b7b7ca38c4 [FIX] website_event_track: put partner_biography back on track proposal
Small oversight of #60847 where the "partner_biography" field was mistakenly
removed from the frontend track proposal form.

This commit simply re-introduces the field back into the form and saves it when
submitting the event.track proposal.

Task-2500455

closes odoo/odoo#69116

X-original-commit: cef6d91190de0c305c2f7a45b87717db28a9c7db
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2021-04-12 10:39:39 +00:00
Noe Antoine d47d64963e [REF] website_event_track: Track Proposal Form Revamp (GDPR)
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>
2021-04-02 16:07:59 +00:00
std-odoo a48f5a3736 [IMP] event_*: allow Event Users to manage the events from website
Purpose
=======

Before, the Event Manager could make some action on the frontend size,
like joining full meeting room, see unpublished track...

Now, the Event User has more permissions and can create Event, Track...

So, we want also to change the logic on the frontend side and allow him
to do the same actions as the Event Manager.

Task ID-2204364
COM odoo/odoo#57022
ENT odoo/enterprise#13984
UPG odoo/upgrade#1897
2021-04-02 13:44:07 +00:00
Romain Derie f2583f3de4 [IMP] website(_*): prevent wrong multi website access during dispatch
Before this commit, routes were prevented to be accessed if the route model was
not accessible from the current website, eg you couldn't access blog1 which is
set to website2 from website 1.
That would raise a 404 even from admin/editor.

This commit introduce that behavior at a lowel level in a generic way, instead
of having to write it on every route.

Note that routes without a model converter won't benefit from this.

Closes #63499

closes odoo/odoo#64313

Related: odoo/enterprise#15688
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-01-25 11:01:13 +00:00
Nasreddin (bon) 82ca092bd1 [FIX] misc: Babel; handle 'kur' (kurdish) locale
Issue

	- add a new language with locale code KUR (for Kurdish)
	- print any report with a datetime on it (RFQ for example)

Cause

	Babel (version < 2.7.0) does not handle locale "KUR".

Solution

	If wrong locale or not managed by Babel, try to fallback
	on server default locale.
	If still wrong locale or not managed, then fallback on "en_US" as locale.

opw-2416482

closes odoo/odoo#64304

X-original-commit: e6ccdb397792db62c3b08d96435b3c1667c1aa9d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-01-10 19:59:01 +00:00
Thibault Delavallée de8a5652b2 [REM] website_event_track_session: merge into website_event_track
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
2020-08-21 17:30:13 +00:00
Thibault Delavallée 1163013ed6 [REM] website_event_track_online: merge into website_event_track
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
2020-08-21 17:30:13 +00:00