summaryrefslogtreecommitdiff
path: root/addons/website_livechat/controllers
AgeCommit message (Collapse)Author
2021-04-30[FIX] website{,_livechat}: 'Website Visitor' translatedNicolas Lempereur
Make translation works for "Website Visitor" that was appearing when a logged-out user open a livechat session. note: list comprehension has to be removed since translation only search language in direct calling method closure. opw-2504461 closes odoo/odoo#70135 X-original-commit: 7e0cf9679ee86e1b3e8094606fd815ffe46eb3c1 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-03-29[FIX] im_livechat, website_livechat: fix rating valuesDavid Beguin
Rating values have been reviewed to be between 1 and 5 but not in livechat apps. This commit align rating values. Task ID-2301261 PR odoo/odoo#60549
2020-06-15[REF] mail, *: refactor messaging with OWLSébastien Theys
This commit is a significant rewriting of client-side discuss, chatter, chat window, and messaging menu using OWL. The behavior should be broadly the same, with some slight functional changes here and there. From a technical standpoint, the code of messaging is mainly organized in 2 main groups of modules: - models, which are logical entities that depict the client-side state of messaging as a whole. - components, which are in charge of displaying information from models. This refactoring also introduces new JS guidelines regarding folder structure (/static) and naming rules for JS modules. Community PR: https://github.com/odoo/odoo/pull/39023 Enterprise PR: https://github.com/odoo/enterprise/pull/6249 Task-1914207 This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier, with the precious help of Lucas to speed it up towards the end. closes odoo/odoo#39023 Related: odoo/enterprise#6249 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Co-authored-by: Alexandre Kühn <aku@odoo.com> Co-authored-by: Julien Giannone <jgi@odoo.com> Co-authored-by: Lucas Perais <lpe@odoo.com> Co-authored-by: Sébastien Theys <seb@odoo.com> Co-authored-by: Xavier Dubuc <xdu@odoo.com>
2020-05-01[IMP] website: simplify website menuDramixDw
Some apps, once installed, automatically create a menuitem in website. What complexify the UI and create useless menu withtout plusvalue. It is not because you install livechat to make support online, that you want a link in your menu to show stats e.g. Now we remove the default menu created, and help user to find it when he create a link. The autocomplete suggest most of the main App's controllers task-2189613 closes odoo/odoo#49081 Related: odoo/enterprise#9733 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-03-17[IMP] website_livechat : add various tests on livechat and visitorsDavid Beguin
Adds Python tests and javascripts tours on livechat (website and visitor integration). Because breaking livechat every two days in rush periods (or even not) is getting quite annoying. Those tests are testing : - The client side flow (open livechat, send messages, send rating and close the livechat session) - The channel and message author naming, visitor page view history - Chat request flow (complete chat request flow, open empty operator's chat request and cancel due to visitor's new chat session) Task ID : 2079087 PR #40052 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-12[REF] im_livechat, website_livechat : move close livechat session to base moduleDavid Beguin
In order to be able to flag the livechat as inactive when the visitor left the conversation, livechat_active field is moved to im_livechat module, as it is not linked to website_visitor. This commit is also a preparation for next one, which will implement the close conversation right after the first click on x button in livechat window (at visitor side). We needed the livechat_active flag to be available without website installed. Task ID: 2120210 PR #39939
2019-11-22[FIX] im_livechat, website_livechat: fix use visitor name in livechat sessionDavid Beguin
im_livechat main controller was referring to website.visitor but this module is not depending on website. The usage of website visitor's name should have been done in website_livechat module. This commit fix this issue. Task ID: 2116715 PR #40732 closes odoo/odoo#40884 X-original-commit: defb98c1083e55ff02f290c3c6257a4ca8dc7d1f Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-19[REF] rating, various: improve rating.rating ACLsryv-odoo
PURPOSE Rating model should be available only for internal users. External users access them only through dedicated routes or controllers using sudo and/or granting access through tokens. Therefore simplifying ACLs should be feasible. SPECIFICATIONS Remove access to rating.rating for public and portal users. Only employees can access it, with full access given to system admins. Update various functional flows to use sudo() and check that access is verified before using sudo. Impacted modules * rating / mail: add groups on some rating related fields as only internal users should access them now; * rating / mail: set some statistics fields using compute_sudo as their value should be accessible for external people even without access to the underlying rating.rating records; * project: makes some use of rating and has to be updated, notably for the public rating page; * website_{livechat, rating, slides}: add sudo in public routes as access is already granted; * website_slides: set statistics field using compute_sudo as their value should be accessible for external people; TASK ID 2053096 PR #36592 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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-18[FIX] website,*: remove useless route from sitemapJeremy Kersten
preparation for cleaning of v13 task-2065018 closes odoo/odoo#39051 X-original-commit: 8a0fc6476c70a4126043de3b3efbd1096e41f968 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-30[FIX] livechat : fix rating per user in livechat frontend viewDavid Beguin
rating_per_user was instanciated the wrong way, as all the key pointed to the same reference. Once a value was modified in the value dict, all the other values in rating_per_user were also updated. Task ID: 2076656 PR #37511 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-17[IMP] website,livechat : apply various imp and fix on visitor viewsDavid Beguin
Applies various improvements: - Remove welcome message if chat request usecase. - If a visitor is online: line is green / if offline: line is red (in the list view) - Visitors list view: add first / last connection fields and remove time_since_last_action - Avoid useless leave notification if the livechat channel is empty Fix - ACLS on website_visitor_page model (for im_livechat_group_user) - ACLS on website_visitor and website_visitor_page model (for sales_team.group_sale_salesman) - Update visitor lang if visitor change the website lang. - Create visitor twice when translated website (due to rerouting) - Avatar for visitor banner in discuss. (image_64 instead of old image_small) Task ID: 2056080 PR #36290
2019-08-19[IMP] website_livechat : allow to send chat request to a website_visitorDavid Beguin
This commit allows a livechat operator to send a chat request to a connected and available website_visitor. A visitor is considered as connected if his last tracked website.page request was within the last 5 minutes. A visitor is available if he doesn't have an active livechat conversation (mail_channel with type = livechat). - If another operator sent him a chat request - Or if the visitor asked himself to speak with an operator (via the normal and existing flow) A livechat conversation is active while the visitor haven't left the conversation. An operator cannot leave a livechat conversation, only the visitor can. The flow to send a chat request: - On the visitor view (tree or form), operator click on 'send chat request' (button or livechat icon) - A empty conversation with the visitor pops up at operator side. - While the operator didn't send a message, the visitor won't see the conversation. - The operator can type a message to the user - If the operator close the chat without sending any messages, the chat request AND the mail_channel are both deleted. In this case, the visitor is then available to send him a new chat request. - If the operator send a message, at the visitor's next action (page navigation on pages that allows livechat, based on livechat rules), the conversation will pop up at visitor side, using the livechat button widget. The visitor won't be able to request a livechat conversation with an operator until he leaves the chat requested by the operator. - Once the visitor leaves (with or without rating) the conversation : - the operator is notified that the visitor has left the conversation - the chat request is deleted to keep the chat request table clean and minimal - the livechat conversation if set to inactive. - The visitor is now available again to send him a chat request. This feature uses the already existing livechat_session cookie mechanism, so no further code modification was needed to make this work. It's directly integrated is existing livechat flow. The chat_request model is only useful to quickly check if a visitor has a chat request and to send the livechat conversation info to the visitor via the livechat_session cookie. This commit also add a website_visitor banner info on discuss view : To be able to quickly see all the relevant information of a website visitor while talking with in discuss view, a fixed banner have been added. Only the discuss view will benefit from this because detached chatter window is to small to display such banner. Task ID: 34624 PR #2028059
2018-12-05[IMP] website_livechat : show ratings per operators in channel stat webpageDavid Beguin
This commit adds more precision about ratings per operators for a specific channel. Only the operators that have been rated on the last 100 feedbacks have their statistics displayed. The other operators that did not worked (or have not been rated) on the last 100 feedbacks are still displayed but are flaged as 'Not rated yet', so we still can see who is working on this channel. Task ID : 1895998 Closes PR #28283
2018-06-12[MERGE] forward port branch saas-15 up to d44cd778844Christophe Simonis
2018-06-07[FIX] website_livechat: use only consumed ratingsNicolas Martinelli
The percentage computation of statistics only uses the consumed ratings >= 1 (through `rating_get_repartition`), while the initial search of the first 100 ratings doesn't have this restriction. It leads to an inconsistency between the ratings displayed and the percentages computed. Moreover, if there are less than 100 ratings, the percentage might not be a natural number => use of float and round. opw-1854863
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-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-04-28[FIX] Various P3-related import changesxmo-odoo
* LDAP import: python-ldap is not python3-compatible, pyldap is Warning: only supported from debian Stretch (current testing)? https://packages.debian.org/search?searchon=names&keywords=pyldap * implicitly relative imports * imports of moved or removed stdlib modules issue #8530
2016-08-10[IMP] various: use odoo for imports instead of openerp and update class namesThibault Delavallée
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.
2015-09-01[IMP] im_livechat : refactoring + improving performance by removing rpc callJérome Maes
2015-09-01[REF] im_livechat : refactoring, make it compatbile with the nw mail module, ↵Jérome Maes
change reporting sql view (split them in 2), adapt view, ...
2015-04-28[MIG] bus, im_chat, im_livechat, website_livechat : migration to new API.Jérome Maes
Migrate the models and controller to new API. Renaming xml id according to convention, renaming openerp tag into odoo tag. Add comment strings and documentations.
2015-02-12[IMP] website_livechat : use the correct publish button. To do so, a better ↵Jérome Maes
security (with public and website_publish) was required. The inherit of ir_ui_view allow to display the default website channel by passing the fact that it can be website unpublished
2015-01-08[IMP] website_livechat : make it depend on rating_livechat. It now propose ↵Jérome Maes
to display livechat channel on website pages, with its ratings and description.