Commit Graph
23 Commits
Author SHA1 Message Date
Martin Trigaux cd2f330bec [IMP] *: remove glocal ACL
Specify explicit route for each ,, line
This is part of task 3230280 where global ir.model.access will be
forbidden.
The goal is to make access to public/portal explicit. Too often,
global access was granted with only employees in mind.

Remove ,,0,0,0,0 lines

mail:
employee already had read access to mail.group
still needed to subtypes as in ir.rule domain

mail_group: employee already had read access
pos_mercury: only needed for employees

membership:
move public access for website_membership as needed in the controllers

website_customer: employee already had read access

website_event_booth: no need for category
website_event_exhibitor: retrieved in sudo
website_event_track: not needed for location

Part-of: odoo/odoo#125216
2023-07-11 22:33:47 +02:00
Xavier Luyckx (xlu) ba87691460 [IMP] website_event, * : empty states
*: website_event_booth, website_event_exhibitor, website_event_track

Before this commit, when no events (or exhibitors, tracks,..) were
displayed for the user, only a title (eg. "No events found.") was shown
to them.

Now, it will display an illustration (color adapts to theme's color)
alongside more information:
- title
- call-out
- call-to-action for editors (add event, tracks, exhibitors..)

task-2489681

closes odoo/odoo#107638

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-02 14:29:49 +02:00
Martin Trigaux 2afdda2576 [I18N] *: export saas-16.3 source terms
closes odoo/odoo#123046

X-original-commit: 137f5ca0cb703ee953cb01db525362f7a778e6bd
Related: odoo/enterprise#41703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-01 11:43:51 +02:00
Noe Antoine 311f53b154 [IMP] website_event_booth{_exhibitor}{_sale}: add chevrons to booth process
CHEVRONS

Add chevrons to the event booth front-end process. A template is added
to be called in booth choice and form views, and the one called from js
is also updated with chevrons. The code is minimized, and fits for the
three current steps only.
- Booth Selection
- Contact Details
- Confirmed / Payment

CLICKABLE + REMEMBER BOOTH CHOICE

To ease the process of changing booth / booking another one, the
"Booth Selection" chevron is clickable and highlighted on hovering.
Also, it will keep booth_ids and booth_category_id url parameters.
From that, the category will be selected and the booth_ids checked
(if available), the first time the selection screen is loaded (once
the user goes between booth categories, it will not remember booths
any more and not preselect any) In order to do so, the arguments are
added to the appropriate methods in controller (and overrides), with
particular attention to match format. (string vs int...)

SCSS

Styling is added in website_event_booth.scss. Cautions are taken to
ensure proper chevrons coloring even with edited theme colors.

DYNAMIC WORDING

Instead of 'confirmed', 'payment' is used in chevrons, and "Go to
payment" instead of "Book my Booths" in the contact details form,
if one of the following is true (~ new boolean value 'use_payment_step'):
- In selection screen: at least one category is not free
- In Contact Details screen: the chosen booth is not free
- In both Selection and Contact screens: if cart has non null total
amount. (this is the current logic used to redirect to payment)

CONTROLLER REORGANIZATION

In order to add the "use_payment_step" to the rendering values,
the routes of those views now have their value preparation methods,
making them easily overriden (done while maintaining guidelines)

OTHER CHANGES

- Some wording on the form
- Hide sponsors in the booth booking flow
- All views have the same space between chevrons and content (48px)
- Tour is updated to match new wording.
- New map icon and simple link button to display the map of booths.
- No more justify content for display of booth categories
- unglue the rows of booths vertically
- Remove the use of jquery where possible in worked areas.
- Rename activeType to clearer activeBoothCategoryId in JS

Task-2821962

closes odoo/odoo#114052

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-05-30 13:03:00 +02:00
Benoit Socias 02ed9f5e66 [FIX] website, *: avoid using unescaped query parameters
*: google_recaptcha, web_editor, website_blog, website_event_booth,
   website_event_exhibitor, website_event_track, website_forum,
   website_jitsi, website_sale_comparison, website_slides,
   website_livechat, website_twitter

This commit fixes improperly escaped query parameters across javascripts
of website-related modules.

See https://github.com/odoo/enterprise/pull/31711

closes odoo/odoo#118599

X-original-commit: 89be076aa51b097ada48d0046006be4d9692ac1e
Related: odoo/enterprise#39783
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2023-04-18 11:33:46 +02:00
Michael (mcm) ff0d6dd580 [REF] *: replace odoo module by native one
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.

task id: 3162300

closes odoo/odoo#117305

Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-03 17:07:24 +02:00
Mahamadasif Ansari 81bb575598 [IMP] website_event_booth_*: propagate fields and redirect the page to the cart
{sale, exhibitor, sale_exhibitor}

Specification:
- Currently, when a user books an event, it redirects to the checkout page;
  however, if the user already has some items in their cart, they will appear
  at the checkout; if they need to remove them, they must go to the cart page.
  It's better to redirect users to the cart page rather than the checkout page.
- When a user enters the booth registration value, it fills the fields name,
  email, phone, and mobile, but when the user enters the address of the
  order, the same fields are filled by the user, so it is preferred that the
  fields value entered in booth registration appears in the address of the
  order as well.

This commit done following changes:
- Redirect the review order instead of the checkout order when booking
  the event booth.
- By adding the partner to the order, it can propagate the values of the
  fields name, phone, and email.
- When a partner is created in the website event booth, the email address is
  stored in the name. This commit passes the name and email instead of the
  email address so that the partner can be stored with the name.
- If the contact does not have a name or phone number, it will set the
  sponsor's name or phone number as the contact.
- Adaptations to the tour to accommodate the above changes

task-3098295

closes odoo/odoo#112525

X-original-commit: ca2bac512000674d1ee55ed3151bbdace2311234
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-02-17 09:50:50 +01:00
Martin Trigaux 1a8772769e [I18N] *: export 16.0 source terms
closes odoo/odoo#100573

Related: odoo/enterprise#31507
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-20 13:48:49 +02:00
Romain Estievenart 98a97d0fea [IMP] *: removes .form-group
this commit removes the usage of .form-group class which is deprecated
since BS5.

Here is the css rules that was used:

a) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L1997
As we can see, it simply adds a `margin-bottom` of `1rem` which
corresponds to the `.mb-3` BS class.

b) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L2326
As we already checked all `form-inline` in [1] and [2], we don't have to
do anything about these rules.

'''Breaking change: Dropped form-specific layout classes for our grid
system.
Use our grid and utilities instead of .form-group, .form-row, or
.form-inline.'''

https://getbootstrap.com/docs/5.0/migration/#forms

Notes:
- `position: relative` is already on `#new-password-group`.
- `.field-db`, `#editor-media-image`, `.unsplash_img_container` and
`#url-form-group` seems unused.
- Sometimes margins are unnecessary because of blocks overlapping.
  (e.g. `margin-bottom` is not needed if margin-top is set on the
  following node)
- CSS rules applied on `.s_website_form_rows > .form-group` are now in
the XML by adding `mb-0 py-2` BS classes.

Follow-up of:
[1] https://github.com/odoo/odoo/pull/97967
[2] https://github.com/odoo/enterprise/pull/30343

closes odoo/odoo#100052

Related: odoo/enterprise#31261
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-16 20:51:56 +02:00
Gorash 39ea7a1fab [IMP] web/all: XML templates are now declared into the python manifest.
Adapt all manifest, split some XML file and update JavaScript files.

Part-of: odoo/odoo#95500
2022-09-14 20:25:01 +02:00
Jérémy Hennecart (jeh) 8285c2a6d1 [IMP] website_event(_*): refont frontend based on colors chosen
This commit removed static background color and the like in all event
modules. Since it's possible to configure colors from the website_editor,
we should used these ones in the frontend.

When an element is superposed on the background we used the later with a
mix of the primary color to have a demarcation and a better visibility
based on the colors chosen.

task-2845417

Part-of: odoo/odoo#91883
2022-09-06 22:31:03 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Romeo Fragomeli eee625bbb0 [REF] *: BS5: Migrate btn-block
Due to the removal of btn-block we need to change the display to grid

> Dropped .btn-block for utilities. Instead of using .btn-block on the
> .btn, wrap your buttons with .d-grid and a .gap-* utility to space
> them as needed

https://getbootstrap.com/docs/5.1/migration/#buttons

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:23 +02:00
Romeo Fragomeli 903e72d0ac [REF] *: BS5: various
Refs:
https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:20 +02:00
Martin Trigaux 5acb6db891 [I18N] *: export saas-15.4 source terms
closes odoo/odoo#93246

X-original-commit: 5ff6d185f70650c26c28a6aef7dd37c859ab58d2
Related: odoo/enterprise#28218
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-10 07:27:26 +02:00
Adrien Schoffeniels 5ccdef06a7 [IMP] website_event: lower footer on event pages
PURPOSE:

This commit adds a min-height property to event pages so that
the footer does not take the entirety of the screen when a page
has little content.
To not have a strange empty space on the booth event page when no booth
is set or when the event is finished, the related error messages are
now displayed below the cover instead of inside it.
It also removes the default grey background on some templates,
so that the theme background color is used instead.

Task-2831951

closes odoo/odoo#89602

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-06 07:09:21 +02:00
Jérémy Hennecart 6649e7c39c [IMP] *event*: replace t-esc by t-out
Replace each t-esc by t-out since it's now deprecated in templates

task-2458013
COM PR: odoo/odoo#78049
ENT PR: odoo/enterprise#21543
2022-03-23 20:18:34 +01:00
Julien Castiaux c0647b5c52 [REF] core: HTTPocalypse (14) changes all addons
This commit is the 14th commit of a comprehensive refactor of our HTTP
framework. See odoo/odoo#78857 for complete historic, discussions and
rationnals.

* `request.uid = x` => `request.update_env(user=x)`.
* `request.context = x` => `request.update_env(context=x)`.
* `request.context = dict(request.context, x=y)`
   => `request.update_context(x=y)`.
* `request.cr = None` => `request.cr.close()`.
* `http.mono_db()` => `request.db`.
* `http.dispatch_rpc()` => `service.dispatch_rpc()`.
* `@service.model.check` => `service.model.retrying()`.
* `request.endpoint`
   => `env['ir.http']._match(request.httprequest.path)[0].endpoint`.
* `request.routing_iteration `=> `removed`.
* `request.jsonrequest` => `request.dispatcher.jsonrequest`.

Note that `request.params` is now set much later in the process. If you
are in a situation where you values from the query string or the
http body you can use `request.get_http_params()`.

Note that using the new `request.future_response`, it is possible to
add headers and cookies on the response object before the response
object is initialized. Please note that headers/cookies saved on
the future response will NOT be injected in case of error.

PR: odoo#78857
Task: 2571224
2022-02-24 13:30:51 +00:00
Martin Trigaux d99cfd9416 [I18N] *: export saas-15.1 source terms
closes odoo/odoo#80964

X-original-commit: 0663892a34896980008eb0de69aeb58019a67e89
Related: odoo/enterprise#22759
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-07 13:48:53 +00:00
Patrick Hoste 7bfb6d7f01 [FIX] (website_)event_booth(_sale): fix display default booth category image
PURPOSE

Before this commit when a booth category doesn't have an image a
traceback is shown when accessing to the /booths route.
After this commit a default image is shown when the booth category
doesn't have an image.

SPECIFICATION

To allow the public user to see the booth category image we give
everybody the read permission on the model but restrict some
sensitive fields.

LINKS

Task-2635461

Pr: odoo/odoo#77081
Related: odoo/upgrade#2869
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2021-10-04 15:30:26 +00:00
Patrick Hoste 2fab359e32 [IMP] website_event_booth(_sale): change registration success redirect to ajax call
PURPOSE

Before this commit when confirming a registration on the frontend the form
was directly sent to the controller and the user was redirected on the
success page if no errors.
After this commit an ajax call is made after validating the form and the
success page is directly loaded from the response... there is no redirect
anymore.

This way of displaying the success page prevent using the link generated
before by another user and getting private information about the booth's
renter.

Two more advantages are that it's easier to maintain and it's slightly
faster than before since the whole page isn't reloaded.

LINKS

Task-2635461
PR : odoo/odoo#77081
2021-10-04 15:30:25 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +00:00
Patrick Hoste 60092b78e0 [ADD] website_event_booth: add frontend page for booths reservation
PURPOSE

This module enables the Booths registration on the frontend by adding
a dedicated page on the related event.
The user will have to first select a booth category and then select one
or more booths to book. He will then be asked to provide his contact informations.
The booths will directly be set to unavailable... First come, first served.

LINKS

Task-2318655
Closes : odoo/odoo#71104
2021-09-02 14:14:33 +00:00