summaryrefslogtreecommitdiff
path: root/addons/website_event/controllers/main.py
AgeCommit message (Collapse)Author
2021-03-01[FIX] website_event: make allowed_field customizableThibault Francois
Problem ------- Since https://github.com/odoo/odoo/commit/d3b18979bfb5496fa4370fdf03a806c469127730, when a visitor register for an event, the fields in the POST are checked against a list of allowed fields. The list is hardcoded inside the method _process_attendees_form. Solution -------- Move this list in a specific method that can be easily overidden by another module closes odoo/odoo#66757 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-31[FIX] website_event_*: fix minor view/wording issuesAurélien Warnon
This commit fixes a few wording and view issues, notably: - Avoid breaking the talk description page when description is very long - Modify all occurrences of "starts at" to "starts on" (better wording) - Move the "hide sponsor" concept from _exhibitor to _track_online To be able to hide the sponsors on the "registration confirmed" template - Hide the sponsor block in "mobile" view (breakpoint md) - Make some minor layout adjustments Task ID-2325327 PR odoo/odoo#56430 X-original-commit: 956555af005ad1188ef5638c0a590074441efdba
2020-08-21[REM] website_event_online: merge into website_eventThibault Delavallée
PURPOSE Clean organization and models linked to Event Online feature introduced in semi stable saas-13.3 at odoo/odoo@981f95bbf46658eda9f2d33751b9310cc67d86aa and odoo/enterprise@14722028ae0773c3710ea48ce48ff44703e83b5a 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 online to website event. Update dependencies accordingly. LINKS Task ID-2319779 COM odoo/odoo#56067 ENT odoo/enterprise#12520 UPG odoo/upgrade#1654
2020-08-17[FIX] website_event(_*): improve user flow and experience from frontendstd-odoo
PURPOSE Provide some fixes after internal test deployment of event online features. Notably: user registration flow, various fixes in templates. Also add some unit tests to avoid regressions while working on event features. LINKS Task ID-2169118 odoo/odoo#55967 odoo/enterprise#12438 X-original-commit: e66684b23eebaadc3df7b908427d3d7a83d4f0a0
2020-08-17[FIX] website_event: correctly support registration creation from frontendDebauche Stéphane
Ensure values coming from frontend are correctly formatted. Task ID-2169118 odoo/odoo#55967 odoo/enterprise#12438 X-original-commit: 492ef200892b991ea780af829c792d4079d2d66e
2020-08-12[IMP] website_event,sale_*,slides: use is_view_activeJeremy Kersten
Use is_view_active instead of viewref which one is cached. closes odoo/odoo#55816 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-04[IMP] website_event_online: add base for testsThibault Delavallée
RATIONALE Events are sometimes held online, gathering a community. In this merge we improve Event application to better support full-online events with improved tracks, wishlists, chat rooms, ... PURPOSE In this commit we add base for tests linked to online event and all its sub modules. LINKS Community PR #53540 Enterprise PR odoo/enterprise#11384 Task ID-2252655 (Main Online Event task) Task ID-2283796 (Event B2Basics / Registration Flow) Co-Authored-By: Aurélien Warnon <awa@odoo.com> Co-Authored-By: David Beguin <dbe@odoo.com> Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-07-31[IMP] website_event: allow to add values before rendering the registration ↵std-odoo
template Sub-modules will need to add new values before rendering the registration template. This will be used to be able to display more information in those modules, e.g. a toast message when being redirected to register. For that purpose we create a method to prepare those values and separate value creation from template rendering itself. LINKS PR #55260 Task ID-2310491 (Event Online Preparation 5) Part of Task ID-2252655 (Main Online Event task) Part of Task ID-2283796 (Event B2Basics / Registration Flow)
2020-07-15[FIX] website_event: restore the online magic countryJeremy Kersten
Removed with commit aebe199d80c5c7411c3db44386c7b9f3cc5b712d, but independant of is_online Restore partially the feature, order by physical event is no more easy to restore since is_online field doesn't exists anymore to sort. Can be done as a custo if really required. closes odoo/odoo#54516 X-original-commit: a6be8cfa40525c5d835cdb40e2e8936aeb36864c Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-18[REF] website_event(_sale): create registrations in batch when buying ticketsJérémy Hennecart
PURPOSE Create event registrations in batch. It will allow to customize group-creation of registrations, notably with automated rules for crm / event synchronization. SPECIFICATIONS Instead of creating registrations one by one when processing registration form details, simply batch-ize their creation. Instead of creating registrations one by one when adding a new line in cart simply let website_event handle its job, or the confirmation action of a sale order that already populates registrations. Creating registrations when adding a cart line has no real use as we have no specific information to create that registration. It is better to let the flow finish and create additional registrations in batch once SO is confirmed. LINKS Task ID 2258685 Prepare Task ID 2166679 (create leads from registrations) PR odoo/odoo#51341 Co-Authored-By: Jeremy Hennecart <jeh@odoo.com> Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-05-14[IMP] *: convert to private methodsMartin Trigaux
render, render_template, load, activity_schedule_with_view, get_website_pages should all be private: It should not be possible to render an aribtrary template only with its name or id Still need to render some qweb views from js so the method render_template is kept public. This explains why the website editor still need read access on ir.ui.view as we want to allow any snippet to be rendered.
2020-05-08[FIX] website_event: website.404 became http_routing.404 in 423402fJeremy Kersten
Before this commit, the /event/event-id/page/inexisting_page crashes with an internal error 500: of1 ValueError: View 'website.404' in website 1 not found X-original-commit: d493fdd2e837b5e6931bd8c2c4d57712432f9107
2020-04-03[FIX] website_event: better sold out computationThibault Delavallée
Purpose of this commit is to remove some complex check embedded in templates and replace them by a computed unstored field. It eases definition and understanding. Its computation has been cleaned, so that sold out appears only when tickets are really sold out, not if their end sales date is reached. Sold out label is displayed in both event list and event specific page views in frontend. Small spacing issues in frontend registration form are also fixed. Task ID 2228189 Community PR odoo/odoo#48652 X-original-commit: c36cf90e7b83d2424b2f52ad8a2fec0bf367e8d8
2020-04-03[FIX] event: ensure event_registrations_open can always be computedThibault Delavallée
Using a compute_sudo ensure this field is correctly computed (aka without crash) if someone is allowed to read the event but not all its sub models. For example event_registrations_open reads the active flag of a product linked to a ticker which may not be readable by public users. This field is used in frontend templates and therefore usable by external people. Also remove unnecessary registrable rendering parameter in website_event as it has been replaced by computed fields. Task ID 2228189 Community PR odoo/odoo#48652 X-original-commit: b2b334a65f3a1379f25717ec39f0a52f3305b19c
2020-03-31[REF] (website_)event(_sale): change seats_availability field to seats_limitedPatrick Hoste
PURPOSE Change seats_availability selection field into a boolean field and rename it to seats_limited for consistency. SPECIFICATION Change all the tests accordingly. Task ID : 2198660 PR : #46659
2020-03-31[IMP] (website_)event(_track): change event form view displayPatrick Hoste
PURPOSE Change the event form view to improve its usability and make it clearer. SPECIFICATIONS - Change some stats buttons icons - Change order of the fields and put the range date field in second place since it's a mandatory field. LINKS Task ID : 2198660 PR : #46659
2020-03-30[FIX] website_event: Ordering more tickets than available seatsGoffin Simon
Steps to reproduce the bug: - Let's consider an event E with Maximum Attendees = 2 and Autoconfirm - Create two kind of tickets Premium with Maximum available seats = 2 and Normal with Maximum available seats = 2 - Go to the website and register for E - Take two tickets Premium and two tickets Normal Bug: Odoo gave the possibility to buy for tickets for E even if the Maximum Attendees was 2 and Odoo never autoconfirm these tickets. opw:2214576 closes odoo/odoo#48567 X-original-commit: ff49afc6c71285cf90f720f2e97f8adedee7204b Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-03-26[IMP] website_event: Improve event registrationqmo-odoo
Purpose: Improve the registration on front-end by allowing the manager to customize it and display more informations to users about the tickets and the status of the event. Specs: For event manager: Allow users to decide wether or not they want to unfold/fold ticket details on their event. The reason behind this is that some events might have 5+ different tickets and having them unfolded would bloat the UI quite horribly. By default, ticket details should be unfolded with no possibility for the end users to fold it back. Always display a button for the manager to go configure the event in back-end For users in general: Show price range in case the ticket details are folded. Clearly show the user that a particular ticket is sold out/expired Cleary show the user that registrations are open/closed/sold out LINKS: TaskID:2162438 PR: #43856
2020-03-26[IMP] website_event, event: Add event.tag.category and event.tag + rename ↵qmo-odoo
event.type display name This commit changes the display name for the model event.type from "Event Category" to "Event Template" This change was needed before introducing the new model event.tag.category which will be used to group tags (event.tag) This commit introduces two new models: event.tag.category & event.tag The tags will be grouped by category and will be used to filter events. In the front-end, if the user activates the "filter by categories", each event.tag.category will generate a new dropdown of related tags. Clicking on one of these tags will add a new "tag badge" above the events (same way as in eLearning). LINKS: TaskID:2162438 PR: #43856
2020-02-27[FIX] website_event: correctly support registrations without ticketThibault Delavallée
Current code handles "no ticket registration" having ticket_id set to 0 as a valid event.event.ticket ID. We fix that issue by correctly setting the many2one to False. Followup of cb928ed6133bc3d2104fbf586bba5cae2a482524 X-original-commit: 7c1acba32d814ec287c60d0a95f3911d51678932
2020-02-18[FIX] website_event(_questions): correctly parse frontend question answersDebauche Stéphane
When user register to an event from website, they can answer questions specific to a given registration or to all registrations. However they are not correctly parsed and not saved. Task 2188857 PR #44545 X-original-commit: e27d9b5c4f234f6ce64456c2f52e7cfb0331332f
2020-02-18[IMP] website_event: improve front-end displayqmo-odoo
This commit makes a few design improvements in the Event list in front-end after some feedback about its usability - Make the 'configure your registration' alter not editable (for studio) - Display the "is online" through a "tag" design, not just text - Remove remaining seats count - Some display cleaning and improvements (design) - Put the event date just below event title on event frontend list - apply some minor design improvements in the /register page. - Filter by month instead of weeks : This commit changes the date filtering in website_event. Before this commit, users could filter events by weeks. After this commit, users will be able to filter by months and will be able to filter events up to two months in the future. LINKS TaskID 2162438 Community PR odoo/odoo#44476 Co-Authored-By: David Beguin <dbe@odoo.com> Co-Authored-By: Quentin Mourier <qmo@odoo.com>
2020-01-30[REF][MOV] website_event(_sale): support tickets in website_event frontendThibault Delavallée
PURPOSE Integration between event and eCommerce is required only when users handle the entire selling process online. However users may require ticketing support while managing payments outside of Odoo. Purpose of this commit is to support tickets directly in event application without need of sales. RATIONALE Remove the need to have event_sale installed to manage basic multi ticket event type. Integration with eCommerce is needed only when one wants to handle the entire selling flow online, i.e. order, payment, ... Integration with Sales is needed only when one wants to create sale orders linked to attendees. Many event users do not need all of this. Their attendees pay through bank transfers or they simply manage payments outside of Odoo while still requiring tickets management. SPECIFICATIONS In this commit we move frontend part of ticket support from website_event_sale to website_event. Now eCommerce / event integration adds only payment information when registering. About tickets * if there is no ticket -> generic registration allowed; * if there is one ticket -> quick registration box; * more than one ticket -> unfolding registration box with all available tickets; About price * sale not installed -> no mention of price. A ticket without price is not free. Its description allow to tell how to pay for example; * a price is set: price is displayed; * no price is set: FREE is displayed; Most event frontend templates and controllers are therefore moved from website_event_sale to website_event. Only part about pricing and sale order creation is now located in website_event_sale. Buy flow remains mainly untouched. Indeed this commit is mainly about moving template to support tickets. LINKS Task ID 2177281 Community PR #43488
2020-01-30[IMP] event: clean code about synchronizing partner / sale order lineThibault Delavallée
PURPOSE This commit is part of ticket model support directly in event application. SPECIFICATIONS In this commit we make a quixotic attempt to clean call chain implied by making registrations online, either in event frontend (website_event) or with eCommerce inclusion (website_event_sale). Purpose is to get rid of some preparation and data management methods to handle most of the code directly at CRUD level whenever it makes sense. We notably * move at create and write level support of partner_id update: updating its name / email / phone / mobile; * move at create and write level support of sale_order-id update: updating event, ticket, partner; Using that and some code cleaning some methods are removed and call chain is a bit reduced. LINKS Task ID 2177281 Community PR #43488
2020-01-28[FIX] website_event: fix pager position and alignmentCocographique
closes odoo/odoo#44128 X-original-commit: d9e7e16c2ef5ac5fb4262a51dc5811f7f402d2cb Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-01-08[IMP] event: replace state by kanban stageDebauche Stéphane
Purpose ======= Remove the state on the event and add a stage. So, we can have more control on the event flow, and we will have less constrains. Website event ============= Before ------ People can register for an event if "seats are available" and if the state is "confirmed". After ----- People can register for an event if `event_registrations_open` is True, - Event: seats are available and the event is not finished - Event sale: One or more ticket has `sale_available` set to True Task #2088538
2019-10-28[IMP] website*: clean sitemapJeremy Kersten
From now, you need to explicitely add sitemap=True if you want your controller into the sitemap. It's the default value, but if you forgot it, it will raise a Warning on runbot. It will avoid wrong controller in sitemap and duplicate (empty) content. From now, if your model contains a field website_id, the modelConverter for sitemap will automatically add the domain: "[('website_id', 'in', (False, current_website_id))]" It avoid redundant declaration and ugly url in redirect/rewrite view. Migration: need to remove it from url_from in website.rewrite task-2065018 closes odoo/odoo#39427 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-01[FIX] *: remove en_US as fallback for lang codewan
en_US may not be activated as it is possible to create a database in another language using the database manager. When trying to install a chart of account, the tax return entry tried to format a date at the installation of the module, with no lang in the context. The fallback was made on en_US but an error is raised if that language is not activated. As it is a very common scenario to retrieve a language from the context, add a generic tool method to do it. Replace and closes odoo/odoo#37629 closes odoo/odoo#37568 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-27[REF] website_event, *: review event design and featuresCocographique
* event, website_event_questions, website_event_sale, website_event_track, base Part of https://github.com/odoo/odoo/pull/37009 task-2043872 Co-authored-by: qsm-odoo <qsm@odoo.com> Co-authored-by: Jérémy Kersten <jke@odoo.com>
2019-09-03[IMP] website, website_event, website_slides: add rel=canonical tagSébastien Theys
The canonical tag is important for SEO, indeed it prevents search engines from indexing duplicate content. Reasoning ========= The choice has been made to create the canonical tag automatically depending on the request path, ignoring the query string, and manually prefixing the appropriate domain and language code. Indeed creating it manually for each resource would create a lot of code and potential mistakes. It is more dangerous to do it the generic way, but after investigation it appears that it is an acceptable trade-off since the vast majority of our routes are well built and already ready for this: - using query string only for minor features that do not change the main content - having the models, the ids, the pager and other important features in the path Override ======== It is still possible to override the default behavior by passing `canonical_params` manually to the view or to the different methods. This is done for `/event` because the only way to display Past Events is to add `date=old`. Languages ========= Fix an issue where it was possible for a bot to be on the URL without language code but to use a language that is not the default language. Adapt hreflang, because it: - must only be present on canonical pages - must always lead to canonical pages - should not be set if there is no alternate language Misc ==== task-1958075 closes #12532 Inspired by OCA module `website_canonical_url` courtesy of Jairo Llopis. closes odoo/odoo#35852 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com> Co-authored-by: Jairo Llopis <jairo.llopis@tecnativa.com> Co-authored-by: Sébastien Theys <seb@odoo.com>
2019-05-21[IMP] website: add specific object for Optimize SEORomain Derie
Before this commit, the object used by Optimize SEO 'wizard' was always the main object, without any possibility to change that (except by changing the main object but that would cause a lot of other issue, eg edit in backend). This commit add the possibility to explicitly set a seo object on the html data attribute. If set, this one will be used instead of the main object. This is useful for event.event where all the event pages (with website menu enabled) would share the same SEO since the main object would be the event.event. With this commit, the seo object is now the website.page, thus giving the possibility to have a separate SEO for every event pages. (Required for Odoo.com website for OXP) closes odoo/odoo#33194 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-26[MERGE] forward port branch saas-12.1 up to f00c490be86Christophe Simonis
2019-03-21[MERGE] forward port branch saas-12.1 up to 6878c9f3424Christophe Simonis
2019-03-14[FIX] website_event: pricelist in event registerJorge Pinna Puissant
Create an event with a price. Create a pricelist with a different price for the event. Add the pricelist to the Public user. On the website, open the event to register. Before this commit, the shown price is the one of the event, and not the one of the pricelist. Now, the price is shown correctly and take into account the pricelist. opw-1951252 closes odoo/odoo#31848 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-19[FIX] website_event,website_event_sale: correction pricelist in event registerAlex Tuyls
A recent fix c41d1d2 was made to select the related pricelist to show the correct price of an event product. This fix creates another bug in case of Ecommerce app not installed, because the method get_current_pricelist is defined in website_sale module. We need to move the fix from website_event to website_event_sale module. closes odoo/odoo#31953 Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2018-12-17[IMP] event, website_event: Make ics file generation available in eventRomainLibert
Ics file generation should be possible even when only event is installed as it is a basic feature of events. Moreover we need to be able to generate such files in order to replace the old outlook api used in the event templates, api which is not supported anymore. We decided to use ics files because it is supported by most calendar schedulers hence working with outlook. Linked to task #1853063 closes odoo/odoo#28477
2018-08-14[FIX] website_event, website_sale: _order on is_publishedRomain Derie
As fbbf24f58ac introduced multiwebsite and `website_published` became a related and/or a computed field (depending of the mixin), we should not order on this field as it is not on DB anymore. We now have the field `is_published` that replace `website_published`.
2018-08-13[IMP] website_[blog|event|forum|sale|slide]: make website specificJeremy Kersten
Set up env & tools for module website multiwebsite (blog, event, sale..) website_id in modelConverter and ir_rule add _compute_domain_keys to have a different cache per website or rules would not be correctly website_dependant eg: blog 1 on website 1, blog 2 on website 2 access blog 1 from website 1 => can access -> normal access blog 1 from website 2 => can access -> should crash because (ir rule) split mixing website.published.mixin and website.published.multi.mixin to have website_id only on last one. multi mixing will: - override website_published compute to take current_website into account (not in backend) - force website when clicking on published in backend - website blog, website_sale, website_event, website_forum, website_slides are now multi website Co-authored-by: Derie Romain <rde@odoo.com> Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-07-24[FIX] website_event: wording typoFabrice Henrion
Closes #25933
2018-06-28[MERGE] forward port branch saas-11.3 up to 3cdcbce93cbChristophe Simonis
2018-06-27[MERGE] forward port branch 11.0 up to 152519cd658Christophe Simonis
2018-06-26[FIX] event, event_sale, website_event: allow portal access to own registrationsLucas Perais (lpe)
OPW 1859364
2018-06-15[MERGE] forward port branch saas-11.3 up to 50860317ccdChristophe Simonis
Note: 1aacc962620982528a3dfc90d2c1dd0027359375 has been ignored and will be forward-ported later
2018-06-15[MERGE] forward port branch 11.0 up to b05e4d5f958Christophe Simonis
2018-06-14[MERGE] forward port branch saas-15 up to a53bea49fe4Christophe Simonis
2018-06-14[FIX] website_event: allow controller to read event.registrationRomainLibert
The controller /event/<model("event.event"):event>/registration/confirm was broken since the portal user cannot read event.registration objects. In 9.0 this was not an issue as we browsed and sudoed the event.registration, but since in 10.0 this line disapeared so did the sudo which this commit reintroduces.
2018-06-05[IMP] website_event: avoid reading of emailsRomainLibert
The new route make_event_ics_file received a list of attendee ids and was sending the emails associated with these in an ics file, this could potentially give out some information about the attendees. (see commit 7862b2b71cab2f2e86439fee9483b972a51783f6) Also the method get_ics_file had no reason to be public and so is now private. Closes #24711
2018-05-29[MERGE] forward port branch saas-11.3 up to 37eed7c509fChristophe Simonis
2018-05-15[IMP] website_event: show physical event before online if country specific.Jeremy Kersten
If a country is specified, we show also all our online events to promote it since they can be followed from anywhere. But we show in priority the physical event. opw-1845012
2018-04-30[IMP] website_event: quick add to Outlook/Google CalendarSanjay Jamod
In order for the user to easily add the date of the events to his calendar we need to facilitate the integration with Outlook/ Google Calendar. For this we add two buttons at the end of the subscription phase (one for Google Calendar and one for Outlook [ics file download]) Task ID: 39315 Closes #21854