diff --git a/addons/website_event_booth/controllers/event_booth.py b/addons/website_event_booth/controllers/event_booth.py index 5873b6183bf..67b990cc747 100644 --- a/addons/website_event_booth/controllers/event_booth.py +++ b/addons/website_event_booth/controllers/event_booth.py @@ -5,7 +5,7 @@ import json import werkzeug from werkzeug.exceptions import Forbidden, NotFound -from odoo import exceptions, http, _ +from odoo import exceptions, http, tools from odoo.http import request from odoo.addons.website_event.controllers.main import WebsiteEventController @@ -102,8 +102,8 @@ class WebsiteEventBoothController(WebsiteEventController): def _prepare_booth_registration_partner_values(self, event, kwargs): if request.env.user._is_public(): - contact_email = kwargs['contact_email'] - partner = request.env['res.partner'].sudo().find_or_create(contact_email) + contact_name_email = tools.formataddr((kwargs['contact_name'], kwargs['contact_email'])) + partner = request.env['res.partner'].sudo().find_or_create(contact_name_email) if not partner.name and kwargs.get('contact_name'): partner.name = kwargs['contact_name'] if not partner.phone and kwargs.get('contact_phone'): diff --git a/addons/website_event_booth_exhibitor/controllers/event_booth.py b/addons/website_event_booth_exhibitor/controllers/event_booth.py index e43b53aa8b2..23ed74cce01 100644 --- a/addons/website_event_booth_exhibitor/controllers/event_booth.py +++ b/addons/website_event_booth_exhibitor/controllers/event_booth.py @@ -26,6 +26,10 @@ class WebsiteEventBoothController(WebsiteEventController): def _prepare_booth_registration_partner_values(self, event, kwargs): if not kwargs.get('contact_email') and kwargs.get('sponsor_email'): kwargs['contact_email'] = kwargs['sponsor_email'] + if not kwargs.get('contact_name') and kwargs.get('sponsor_name'): + kwargs['contact_name'] = kwargs['sponsor_name'] + if not kwargs.get('contact_phone') and kwargs.get('sponsor_phone'): + kwargs['contact_phone'] = kwargs['sponsor_phone'] return super(WebsiteEventBoothController, self)._prepare_booth_registration_partner_values(event, kwargs) def _prepare_booth_registration_sponsor_values(self, event, booth_values, kwargs): diff --git a/addons/website_event_booth_sale/controllers/event_booth.py b/addons/website_event_booth_sale/controllers/event_booth.py index 3978aacb454..c2de0ce13bc 100644 --- a/addons/website_event_booth_sale/controllers/event_booth.py +++ b/addons/website_event_booth_sale/controllers/event_booth.py @@ -37,7 +37,9 @@ class WebsiteEventBoothController(WebsiteEventController): registration_values=booth_values, ) if order_sudo.amount_total: - return json.dumps({'redirect': '/shop/checkout'}) + if request.env.user._is_public(): + order_sudo.partner_id = booth_values['partner_id'] + return json.dumps({'redirect': '/shop/cart'}) elif order_sudo: order_sudo.action_confirm() request.website.sale_reset() diff --git a/addons/website_event_booth_sale/static/tests/tours/website_event_booth.js b/addons/website_event_booth_sale/static/tests/tours/website_event_booth.js index 2e62e26c064..abd4baac667 100644 --- a/addons/website_event_booth_sale/static/tests/tours/website_event_booth.js +++ b/addons/website_event_booth_sale/static/tests/tours/website_event_booth.js @@ -40,8 +40,8 @@ registry.category("web_tour.tours").add('website_event_booth_tour', { trigger: 'tr#order_total_taxes .oe_currency_value:containsExact(20.00)', run: function () {}, }, { - content: 'Click confirm to continue', - trigger: 'a[role="button"] span:contains("Confirm")', + content: 'Click Process Checkout to continue', + trigger: 'a[role="button"] span:contains("Process Checkout")', }, { content: 'Check if the price is correct', trigger: 'tr#order_total_untaxed .oe_currency_value:containsExact(200.00)', diff --git a/addons/website_event_booth_sale/static/tests/tours/website_event_booth_sale_pricelists.js b/addons/website_event_booth_sale/static/tests/tours/website_event_booth_sale_pricelists.js index d7eaaaba699..8cedad3f04e 100644 --- a/addons/website_event_booth_sale/static/tests/tours/website_event_booth_sale_pricelists.js +++ b/addons/website_event_booth_sale/static/tests/tours/website_event_booth_sale_pricelists.js @@ -38,12 +38,9 @@ registry.category("web_tour.tours").add('event_booth_sale_pricelists_different_c { content: 'Submit your informations', trigger: 'button[type="submit"]', - }, - { - content: 'Confirm Order', - extra_trigger: 'h3:contains("Billing Address")', - trigger: '.btn:contains("Confirm")', - run: function () {}, + }, { + content: 'Checkout your order', + trigger: 'a[role="button"] span:contains("Process Checkout")', }, ...getPriceListChecksSteps({ pricelistName: "EUR With Discount Included", diff --git a/addons/website_event_booth_sale_exhibitor/static/tests/tours/website_event_booth_sale_exhibitor.js b/addons/website_event_booth_sale_exhibitor/static/tests/tours/website_event_booth_sale_exhibitor.js index 0820ee420c4..82219adde23 100644 --- a/addons/website_event_booth_sale_exhibitor/static/tests/tours/website_event_booth_sale_exhibitor.js +++ b/addons/website_event_booth_sale_exhibitor/static/tests/tours/website_event_booth_sale_exhibitor.js @@ -7,8 +7,8 @@ odoo.define("website_event_booth_sale_exhibitor.tour", function (require) { _getSteps: function () { return [{ - content: 'Confirm your order', - trigger: '.btn-primary[href="/shop/confirm_order"]', + content: 'Checkout your order', + trigger: 'a[role="button"] span:contains("Process Checkout")', run: 'click', }, { content: "Select `Wire Transfer` payment method",