Commit Graph
11 Commits
Author SHA1 Message Date
tsm-odoo 8e52f40f59 [FIX] test_discuss_full, *: decouple tests from demo data dependency
*: website_livechat.

closes odoo/odoo#143645

X-original-commit: 9643717d911c31f150adab5b699ec7b9219f8981
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-11-27 08:39:49 +00:00
tsm-odoo 66bb1d351b [FIX] {im,website}_livechat: only send guest token when available
Before this commit, live chat would fail for guest portal. In this
scenario, there is no guest token. Before this commit, the guest
token was sent anyway with `null` as value which caused a crash.

closes odoo/odoo#139585

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-10-24 18:11:31 +00:00
tsm-odoo 61ef69a8cf [IMP] im_livechat: small name, ui changes
This PR improves several things linked to visitors in the discuss
app:
- Change window header to "Visitor #, country"
- Change operator's name to Online Chat name if defined
- Rename "Public user" to "Visitor #", add country instead of website
- Change name of the thread to "Visitor #, country" (left panel + header)
- Remove "Website" from visitor's name (small and big threads)

part of task-3332872

closes odoo/odoo#125931

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-03 21:56:01 +02:00
tsm-odoo 9beb4668ca [IMP] im_livechat: improve feedback messages
This PR improve feedback messages:
- Visitor has left the conversation: as note
- Rating message: as note
- Rating message: Use same emojis as for customer
- Rating reason in same message as the emoji, without writing "reason"
- Feedback done in 1 rpc instead of 3

part of task-3332872

closes odoo/odoo#125925

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-29 18:20:25 +02:00
Sébastien Theys 90cb44e1e1 [REF] mail, *: rename mail.channel to discuss.channel
* = bus, calendar, crm_livechat, hr, hr_holidays, im_livechat, mail_bot,
    mass_mailing, privacy_lookup, test_discuss_full, test_mail,
    test_mail_full, website_crm_livechat, website_livechat, base

In preparation of splitting discuss and mail modules.

Part of task-3265211

closes odoo/odoo#118354

Related: odoo/upgrade#4553
Related: odoo/enterprise#39661
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-21 02:21:53 +02:00
tsm-odoo 131948aca5 [FIX] im_livechat, *: fix channel created before user interaction
*: website_livechat.

Before this PR, a `mail.channel` record would have been created before
any user interaction. Since the introduction of the welcome bot, this
issue has gotten worse. Indeed, any user accessing a page with the bot
enabled created a useless channel.

Before 15.3, around 15k channels were created each month, after 15.3,
300-500k channels are created each month, most of them empty channels
whom creation could have been avoided.

This PR fixes the issue by waiting the first user interaction before
creating the channel.

closes odoo/odoo#108566

X-original-commit: b2eaf32ba92e537c7eefba6489533613be1b8c91
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-12-28 10:41:05 +01:00
Luis González 3ca6e48142 [FIX] website_livechat: access error when retrieving chatter info
When chatter information is retrieved but current user has no access to website visitors, an access error is raised and chatter messages are not displayed.

To replicate:
- Enable livechat for current website
- Set user A as member of the livechat
- Log-in with user B, who doesn't have access to website visitors
- Visit any page that automatically opens the livechat with user B (no
  need to input anything, as a livechat is created when the chat window
  pops up)
- Go to backend with user B

To solve the above, visitor information is included only if current user
has enough right to access it.

closes odoo/odoo#84823

X-original-commit: 7fb23842ef2e2950466f44b18005d27443d292f9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-17 16:42:04 +00:00
Raphael Collet f934b29a8a [REF] core: speed up the retrieval of fields on models
Fields are no longer retrieved with inspect.getmembers(), which is
time-consuming.  Instead, the classes defining models automatically
collect their own fields (via Field.__set_name__()), and the field
retrieval is done by using those collections.  Also, a field no longer
needs to introspect its model class to find its field definitions.

A class that defines a model automatically determines its '_name',
'_inherit' and '_module' upon creation, and the fields determine their
'name', 'model_name' and '_module' via Field.__set_name__().

Loading a registry with 290 modules from scratch is now 25% faster.
2021-05-03 12:33:29 +00:00
Goffin Simon 57abcab99b [FIX] im_livechat: Traceback on Safari and Chrome mobile
Steps to reproduce the bug:

- Install website_livechat
- Go to login page on mobile with Safari
- Click on "Have a Question?"
- Close the chat by clicking on the arrow

Bug:

A traceback was raised

Ref:https://stackoverflow.com/questions/19359326/json-parse-fails-in-safari-when-a-string-value-contains-a-comma

opw:2243871

closes odoo/odoo#50715

X-original-commit: 99a5e7c2159f8db3e1ce65f9225f0ce18cc28d70
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-05-06 08:34:59 +00:00
DramixDw 52c23e01e3 [REM] website,*: remove About us page and references
Remove the default about us page because it could be easily recreated and
doesn't add a lot of value to the website.

task-2189613
2020-05-01 07:58:11 +00:00
David Beguin 190dab8144 [IMP] website_livechat : add various tests on livechat and visitors
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-03-17 12:21:48 +00:00