summaryrefslogtreecommitdiff
path: root/addons/website_event/controllers/main.py
AgeCommit message (Collapse)Author
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
2017-11-30[MERGE] forward port branch saas-16 up to 5d7ad2b16ccChristophe Simonis
2017-11-29[FIX] website_event: display normal 404 for non website editor.Jeremy Kersten
Without this patch, the user will see a button 'create a new page' on the 404 for the controller /event/<event_id>/page/<page>
2017-09-28[MERGE] forward port branch saas-16 up to 89df681b458Christophe Simonis
2017-09-27[IMP] website*: clean sitemap + add method to declare sitemap function.Jeremy Kersten
Don't add useless routes or route that will return 404. Improve generate function from ModelConverter to have a better management of query_string. Now we have an helper sitemap_qs2dom that will analyse the current route and check if query string is plausible and if yes, generate a domain, when the query_string don't seems to match the route, we return a Falsy domain. Before this commit, if qs was /product/ipad, enumerate_page check for each modelconverter of the route a name ilike '/product/ipad'. Now we check all routes that contains product and one converter that match ipad or routes that contains ipad and one converter that match product. This commit a new way to declare the sitemap for a route. def sitemap_xx(env, rule, query_string): yield {'loc': '/my_url'} @http.route(..., sitemap=sitemap_xx) In this case, only the loc returned by this function will be in the sitemap for all rules. You can pass sitempa=False, if you don't want that route are into the sitemap
2017-09-26[FIX] preventing context.get('lang')Martin Trigaux
The lang in the context can be None or False To avoid similar error as revealed at ede29e6d, correctly retrieve the context
2017-08-24[MERGE] forward port branch saas-17 up to 877e7098719Christophe Simonis
2017-08-20[FIX] P3: remove pycompat.{keys,items,values} helpersOlivier Dony
Now that we're closer to switching to P3 for good, these helpers have outlived their usefulness, and mostly add noise. All remaining dict.iter*() or dict.view*() must be converted to the normal keys(), values() or items() calls. Whenever the result is likely to be used for more than the scope of a loop, or when the dict needs to be modified during iteration, the calls must be wrapped in a ``list()``, to protect the new P3 semantics. Those cases are very exceptional. Also removed some dead code or improved the API to remove unnecessary conversions.
2017-08-16[REF] web_editor, website, *: complete refactoringqsm-odoo
* mass_mailing, payment, point_of_sale, portal, survey, web, web_tour, website_blog, website_crm_partner_assign, website_event, website_event_questions, website_form, website_forum, website_gengo, website_hr_recruitment, website_links, website_mail, website_mail_channel, website_mass_mailing, website_quote, website_sale, website_sale_options, website_slides, website_twitter This commit reviews the whole "JS side" of the web_editor and website apps. This is a first step to be able to improve them with new and better functionnalities; this commit is not supposed to change any visual behavior. The main goal was to achieve a structure similar to the backend one. Now, the frontend side also has a root widget (like the WebClient) and all other widgets are attached to it one way or another. This allows the benefits of using the 'trigger_up' functionnality for example. As RPC are now mainly done with the `this._rpc` functionnality (being possible thanks to the parent hierarchy), the frontend will also be possible to test thanks to QUnit in a future update (besides the "text" editor side which still requires a refactoring to be able to do that). --- Here are some of the changes: (-) conventions and documentation The code has been updated to follow JS conventions and a lot of code has been commented (around +2000 lines of comment). This also means that lots of functions have been renamed to use camelCase or simply to make their name understandable. See https://github.com/odoo/odoo/wiki/Javascript-coding-guidelines. (-) deprecated: web_editor.base The "web_editor.base" module has been split and does not force the modules which require it to wait for DOM ready anymore. This was indeed slowing loading times, but also prevented to use some modules in some contexts (see the LESS editor use in web_studio which is the subject of another task). Now the "editor context" can be got thanks to the "web_editor.context" JS module with its "get" function. The "web_editor.base" module should probably not be used anymore (see its code and recent updates). (-) new: web.dom_ready If a JS module should wait for the DOM to be ready to be executed, a new JS module has been created: "web.dom_ready". This should always be used in a module which only want to instantiate stuff. Do not extend (or worst, include) classes after DOM ready. (-) website.website The "website.website" module has been split. "website.website" does not return anything useful anymore, it just initialize some miscellaneous stuff, without waiting for the DOM to be ready. You might want to check "website.utils", "website.content.compatibility" or `WebsiteRoot`. Also `website.form` has been deleted (use `this._rpc`), so has been `website.error`. `website.prompt` will be removed in a future update to be replaced by `Dialog.prompt`. (-) widgets are great Many classes which were not widgets are now widgets. This allows them to use the 'events', the 'xmlDependencies' and the 'this._rpc' features for example. Here are some of the main ones: - Snippet options: these were classes with a `$el` for the menu element and `$target` for the customized element. This is still the case but following standard `Widget` structure (one exception: using `this.$(...)` searches in the `$target` as before this update). - Snippet animations: instead of class instances with a `$target` element which can be `start` and `stop`, these are now standard widgets which can be `start` and `destroy`. `this.$target` is an alias to `this.$el` for ease of compatibility. - Snippet editors: instead of class instances in charge of an editor overlay, these are now widgets. Each "child" snippet editor is properly attached as a "child", which allows editors to communicate and to be properly destroyed. (-) root widgets and website navbar The frontend is different of the backend. In the backend, the page has an empty <body/> element and all the components are instantiated from parent to children (i.e. the `WebClient` is instantiated and is in charge of instantiating the `ControlPanel`, etc). The frontend cannot work like that on page loadings as they are way more frequent than in the backend and we do not want them to flicker. A frontend page is loaded as a <body/> element which already contains the website navbar and its menus and the whole content page. JS code has to be "attached" to these existing elements. This is possible thanks to the `RootWidget` instances and the specialized `WebsiteRoot`, `IframeRoot` and `WebsiteNavbar` (see code for details). (-) lazy loading No more (or at least a lot less) XML/JS has to be loaded on page loading, thanks to the use of the `Widget.xmlDependencies` feature. XML which have to be lazy loaded is loaded only on related Widget instantiation if necessary, which allows to execute a lot of JS code before the DOM is ready and to start many widgets on DOM ready (not later). A visual benefit of this is clicking on the 'edit' button as soon as it is possible: before this commit, this was sometimes not doing anything as event handlers were not binded yet. Still a possible exception: loading the session and locales. This may be asynchronous stuff which is still required before widget instantiations but this will be the subject of another task. (-) deprecated code and code location More than reviewing code and organizing it, many apparent dead code was removed. More importantly, mislocated code was put in the right app. This is the case for snippet animations which is a concept for website apps but was defined in the web_editor app, or some translation concepts which were part of website but should have been part of web_editor. --- There are probably more things to say about this commit but I will let the comments speak for those.
2017-08-10[MERGE] forward port branch saas-17 up to 48b2ce60ed1Christophe Simonis
2017-08-10[MERGE] forward port branch saas-16 up to 85571bb78c9Christophe Simonis
2017-08-10[MERGE] forward port branch saas-11 up to cfbac106b49Christophe Simonis
2017-08-10[MERGE] forward port branch 9.0 up to 1aed433f54cChristophe Simonis
2017-08-10[FIX] website_event: Website Event Error when you encode a 0 value in the ↵Goffin Simon
registration The function registration_new must return a type json. opw:765643
2017-08-08[MOV] website, http_routing: move (un)slug support to http_routingThibault Delavallée
Slug and unslug API is now available in http_routing. Indeed there is no link to any website or any reason to not support slufigied URLs when website is not installed. A new unslug_url method is added as a tool coming from an embedded method from website. Doing it allows to have all slug related methods defined at the same point. Support of slug and unslug in qweb rendering is also moved directly in http_routing version of ir_ui_view instead of website inheritance. This is done in order to keep things coherent. Some code from website about ModelConverter is also moved. Indeed both versions of ir_http uses some kind of placeholder to store the uid when converting urls to python. This commit unifies it by using the website one directly in base to simplify the override. This commit also updates all module importing slug. Enterprise modules will have to be updated, see related commit.
2017-08-07[FIX] website_event, _sale: protect against inactive productsLucas Perais (lpe)
Commit 14d1f6f6c11f463375ad6066a74813535755c453 responded to the need to have clean server answers for SEO purposes and specifically when the products on event tickets have been archived BUT it introduced an infinite redirect loop when the event was in state == done This present commit normalize the behavior in a comprehensive manner and cleans up the code a bit OPW 757117 Closes #18667
2017-05-10[FIX] P3: list -> iterable builtins (#16811)xmo-odoo
In Python 3: * various builtins and dict methods were changed to return view/iterable objects rather than lists * and the separate Python 2 view/iterable builtins and methods were removed altogether This is problematic when using these items as list (which the happens repeatedly in Odoo), but more viciously when iterating *multiple times* over them (which also happens, which I've messed up multiple times while writing this, and which is a pain to debug even when you've just created the issue). Convert all code using these to semantics-matching cross-version helper functions to get the LCD behaviour between P2 and P3, and forbid the builtins via lint. issue #8530
2017-03-24[IMP] website_event(_sale): make registration form responsiveJairo Llopis
+ remove redirect that create loop if not child menu and state == 'done' TODO: make attendees registration popup responsive This commit closes #15473
2017-02-24[FIX] website_event[_sale]: don't allow register when event is doneJeremy Kersten
Some previous links could still point to old register page and so display an error 500 if product of ticket has been already archived.
2016-08-31[REF] openerp.http: make `request.context` consistent with `request.env.context`Raphael Collet
2016-08-20[MERGE] forward port branch saas-12 up to 9ad5f26Christophe Simonis
2016-08-04[REF] website_*: remove `render` method on websiteJérome Maes
Since saas-3, website controllers use `request.website.render` to render the template of a web page. This was kept for retro compatibility. It's time to stop using deprecated stuff. Same for `_render` method on website. 'json' route don't use `request.render` since `JsonRequest` has no `render` method.
2016-08-03[MERGE] forward port branch saas-11 up to eb83ab2Christophe Simonis
2016-08-02[FIX] website_event: fix get_formated_date to avoid tracebackJeremy Kersten
Avoid AttributeError: 'WebsiteEventController (extended by WebsiteEventSa' object has no attribute 'env' Self is the controller and not the event.
2016-07-15[MERGE] forward port branch saas-11 up to 87e9639Christophe Simonis
2016-07-15[FIX] website_event: correct typo in new API conversionOlivier Dony
event.event's field is 'country_id', not 'country' Cfr 616f294786761e52478b93234fac44e7458c82e6
2016-05-13[IMP] event: change term 'Subscription' to 'Registration'dut-odoo
Changed term 'subscription' to 'registration' in event, event_sale, website_event, website_event_sale modules
2016-04-14[MIG] website_event: migrated into new APIDharmraj Jhala
2016-04-14[IMP] website_event, website_event_track, website_event_sale : prepare migrationJérome Maes
- change method decorator (api.one -> api.multi) for `_set_show_menu` and `_set_show_menu` - rename controller class
2016-01-08[FIX] website_event: avoid traceback when page doesn't existsJeremy Kersten
The controller /event/<event_id>/page/<page> raise exception if page is not existing. Allow to pass the template reference when user are creating a new page. Without it, it is impossible for the end user to create a website_event page without change manually the xml id because the xml id is based on the module from the template. This fix is retro compatible, because from_template will be ignored until next update of website. And during update from website, website_event will be updated because it's a dependance and so the default_page template created.
2015-09-23[FIX] website_event: categories displayThibault Delavallée
Indeed the type field has been renamed to event_type_id. However some code was still relying on the type and type_count names, instead of event_type_id and event_type_id_count.
2015-08-20[RENAME] event: type -> event_type_idThibault Delavallée
At last I will be able to remember that the type of an event is not a string, but a m2o to event.type model.