Commit Graph
4 Commits
Author SHA1 Message Date
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
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
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
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