Commit Graph
128 Commits
Author SHA1 Message Date
tsm-odoo 4dd66feaff [FIX] im_livechat, *: fix chat requests from operator
*: mail, website_livechat.

This PR fixes two issues with the live chat requests when initiated by the
operator:
- Thread name should not include "website" since [1]
- Welcome message should not be shown when the operator is the one who
initiated the chat

[1]: https://github.com/odoo/odoo/pull/125931

closes odoo/odoo#132815

X-original-commit: 38a6658beec8bd4423ee8b4ac16f2592b9fb36ff
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-23 14:44:00 +02:00
Jorge Pinna Puissant e338487028 [REF] *: remove owl="1" from the templates
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.

Part of task~3443861

Part-of: odoo/odoo#130467
2023-08-11 14:32:30 +02:00
Louis Wicket (wil) f1722c7334 [IMP] *: unify sprintf and gettext
Improve gettext to directly handle value injection within translations,
removing the need for sprintf.

closes odoo/odoo#123932

Related: odoo/enterprise#45370
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-10 18:14:04 +02:00
Michael (mcm) 00d8aef1c7 [REF] web, *: remove legacy patch
This commit removes legacy patch/unpatch functions and adapts their use
by using the modern patch. There was also a custom patch function used
in tests which has been replaced too.

closes odoo/odoo#130867

Related: odoo/design-themes#685
Related: odoo/enterprise#45271
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-07 10:58:48 +02:00
Michael (mcm) 9d6b380a24 [REF] *: adapt patches after new patch function
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.

task 3410198

[1]: 19ea1ac08043e22a811630968e44715cc3bfc495

Part-of: odoo/odoo#125716
2023-08-02 17:29:05 +02:00
Bastien PIERRE 65242e31e9 [IMP] *: Remove alias in JS files
Rename all imports with alias old system to the new js module system
Task ID: 3266759

closes odoo/odoo#127414

Related: odoo/design-themes#671
Related: odoo/enterprise#43716
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
2023-07-27 11:58:34 +02:00
tsm-odoo 2b401d078d [IMP] mail, website_livechat: show visitor lang on member list
Before this commit, the lang of the visitor was only shown on the
member list based on the `anonymous_country` of the channel.

In order for this information to be as complete as possible, the
lang is now also checked on the website visitor if there is one.

part of task-3332872

closes odoo/odoo#128242

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-13 16:52:58 +02: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 9988476b7b [FIX] website_livechat: fix visitor banner avatar
Before this PR, the visitor id was passed to retrieve the
partner avatar which leads to wrong avatar being displayed
in the banner. This PR fixes this issue and adapt the avatar
shape from `rounded-circle` to `rounded` since it was not
adapter after the milk update.

closes odoo/odoo#126969

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-30 23:38:12 +02:00
tsm-odoo 21c1000581 [FIX] website_livechat: fix im_status wrongly positionned
Before this PR, the `im_status` of a visitor was wrongly positionned
in the discuss app banner.

This commit fixes the issue.

closes odoo/odoo#124921

X-original-commit: 09109573814d5a83c4e5432ffe1b252f3e75e954
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-06-14 07:18:43 +02:00
Sébastien Theys 9dba4e0d77 [REF] mail, *: reorganize JS files
Remove "fake" feature sub-folders that make files harder to find.

Note: If there are too many files in the main folder now, a new split
that actually makes sense can be done at a later time: this would not
just be code move, but removing coupling between said feature and the
rest of the code.

Apply consistent structure, where the top level folder is a feature (or
core), and sub-folders are subdivision of the feature depending on
context (closely related to assets bundles).

```
- core
    - common
    - public
    - web
- feature
    - common
    - public
    - web
```

The opportunity is taken to reorganize the top of the files and imports:
- Always use absolute path in imports to be able to find all usages of a
  file with a single search.
- Reorganize imports to group them by module, and to sort them
  alphabetically by path/feature.
- Always use single asterisk (*) for `odoo-module`: less characters yay!
  And double asterisk should be used for JSDoc comments, not for custom
  instructions.

Part of task-3265211

closes odoo/odoo#124168

Related: odoo/enterprise#42121
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-06-08 21:52:44 +02:00
tsm-odoo 70d318876e [FIX] website_livechat: fix non rounded website livechat button
Since [1] the origin livechat button has no border on the bottom.
This conflicts with the skin of the website livechat button
which is displayed as a circle. This commit solves this issue.

[1]: https://github.com/odoo/odoo/pull/123684

closes odoo/odoo#124126

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-07 15:58:54 +02:00
tsm-odoo 20c1772d35 [REF] im_livechat, *: refactor livechat
This PR refactors the public livechat in order for it to use
owl and to rely on the discuss components as much as possible.

task-2212347

closes odoo/odoo#122834

Related: odoo/enterprise#41636
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-02 22:29:06 +02:00
stefanorigano (SRI) 580db954fc [IMP] mail, website_livechat: avatars & Activity apply milk design
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:15 +02:00
tsm-odoo b07085ef21 [IMP] mail,*: remove server data key in thread insert
*: im_livechat, website_livechat.

Before this commit, the `thread.insert` method received an arbitrary
`serverData` key. This was cumbersome since we needed to create this
key manually at each insertion.Moreover some attributes where coming from
dedicated keys, some from the  serverData key, some from both which led
to a bug-prone, hard to maintain code.

This commit removes the `serverData` key in order to solve those
issues.

closes odoo/odoo#121117

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-12 19:55:05 +02:00
tsm-odoo a3525aedbe [IMP] bus, *: add single notification subscription
*: calendar, iap_mail, im_livechat, mail.

Until now, one had to subscribe to the global "notification"
event of the bus service and to loop through each notification
to handle the one that was targeted.

This PR introduces the `subscribe` method on the bus service
in order to subscribe to a single notification type.

closes odoo/odoo#120893

Related: odoo/enterprise#40848
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-10 02:00:45 +02:00
Alexandre Kühn f1566d4d2d [MOV] mail,*: move static discuss/ to discuss_app/
*: im_livechat, website_livechat

In preparation of splitting 'discuss' and 'mail' modules.

This allow using new folder discuss/ that contains all static
files of new module 'discuss'.

Part of task-3265211

closes odoo/odoo#119860

Related: odoo/enterprise#40388
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-27 07:06:02 +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
Benoit Socias 02ed9f5e66 [FIX] website, *: avoid using unescaped query parameters
*: google_recaptcha, web_editor, website_blog, website_event_booth,
   website_event_exhibitor, website_event_track, website_forum,
   website_jitsi, website_sale_comparison, website_slides,
   website_livechat, website_twitter

This commit fixes improperly escaped query parameters across javascripts
of website-related modules.

See https://github.com/odoo/enterprise/pull/31711

closes odoo/odoo#118599

X-original-commit: 89be076aa51b097ada48d0046006be4d9692ac1e
Related: odoo/enterprise#39783
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2023-04-18 11:33:46 +02:00
Michael (mcm) ff0d6dd580 [REF] *: replace odoo module by native one
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.

task id: 3162300

closes odoo/odoo#117305

Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-03 17:07:24 +02:00
Arthur Detroux (ard) 1ebcdb0023 [FIX] website, *: check access rights to display elements in New+ modal
*: website_blog,website_event,website_forum,website_hr_recruitment,
website_livechat,website_sale,website_slides

Prior to this commit, elements inside the New+ modal had a `isDisplayed`
property that was meant to be changed by the patches done by each
module. Unfortunately, this was forgotten in the refactor done in [1]
and more precisely when the component was introduced in [2].

This commit fixes that by checking the access rights of the user on each
individual model used on the create form.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
[2]: https://github.com/odoo/odoo/commit/ca2e143d54622d598201826a2cd669bad64b205d

opw-3198700

closes odoo/odoo#117206

X-original-commit: 58704cb7615addd7d40291431e05a894776320d8
Related: odoo/enterprise#39066
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-30 18:58:59 +02:00
7710c3331e [REF] mail, *: refactor Discuss
This commit refactors discuss code to use OWL components
and new tools and services in web/.
Functionally, Discuss app should work relatively the same as
before this commit.

closes https://github.com/odoo/odoo/pull/110188

Related:
https://github.com/odoo/enterprise/pull/38058
https://github.com/odoo/upgrade/pull/4423

closes odoo/odoo#110188

Related: odoo/upgrade#4423
Related: odoo/enterprise#38058
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre (aku) <aku@odoo.com>
Co-authored-by: Didier (did) <did@odoo.com>
Co-authored-by: Géry (ged) <ged@odoo.com>
Co-authored-by: Louis (wil) <wil@odoo.com>
Co-authored-by: Maël (mapa) <mapa@odoo.com>
Co-authored-by: Maryam (maki) <maki@odoo.com>
Co-authored-by: Sébastien (seb) <seb@odoo.com>
Co-authored-by: Thanh (tso) <tso@odoo.com>
Co-authored-by: Matthieu (tsm) <tsm@odoo.com>
Co-authored-by: Zelong (zel) <zel@odoo.com>
2023-03-17 11:47:09 +01:00
Alexandre Kühn 0422c94a90 [IMP] mail, *: rename registerModel/Patch to Model/Patch
closes odoo/odoo#105096

Related: odoo/enterprise#33679
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-06 02:16:48 +01:00
Alexandre Kühn 56e854471a [IMP] mail, *: introduce @mail/model module
Introduce the '@mail/model' module that gathers all the stuff involved
in model definitions. This allows us to reduce the number of imports.

* = calendar, crm, hr, im_livechat, note, rating, sms, snailmail,
website, website_livechat, website_slides

Task-3056971

Part-of: odoo/odoo#105096
2022-11-06 02:16:48 +01:00
Alexandre Kühn 98323245bc [IMP] mail, *: make discuss component templates more compact
*: hr_holidays, im_livechat, snailmail, website_livechat

Clean template of discuss component templates, so that they
are more appropriately compact, which makes it easier to
read the layout at a glance.

Task-3055780

Part-of: odoo/odoo#105099
2022-11-06 00:28:15 +01:00
Alexandre Kühn 9851c62635 [IMP] mail, *: simplify discuss template (no templateGetter)
This commit simplifies discuss template by putting record accessors
in the context of template.

*: calendar, hr_holidays, im_livechat, sms, snailmail,
   website_livechat

Task-3055022

Part-of: odoo/odoo#105099
2022-11-06 00:28:15 +01:00
Alexandre Kühn 410ab5ae96 [IMP] mail, *: define template in models
*: snailmail, website_livechat

This commit adds definition of component template
in the models. This allows not defining JS of component
for most view models.

Task-3053061

closes odoo/odoo#104641

Related: odoo/enterprise#33491
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-11-02 21:16:56 +01:00
Alexandre Kühn cc6546677d [IMP] mail, *: Rename component to match model (step 2)
[IMP] mail: rename ActivityBox to ActivityBoxView (component)
Task-3046113

[IMP] mail: rename ActivityMarkDonePopoverContent (component)
Task-3046122

[IMP] mail: rename AttachmentBox to AttachmentBoxView (component)
Task-3046129

[IMP] mail: rename AttachmentDeleteConfirm (component)
Task-3046160

[IMP] mail: rename CallActionList (component)
Task-3046187

[IMP] mail: rename CallParticipantVideo to CallParticipantVideoView (component)
Task-3046193

[IMP] mail: rename ChannelInvitationFormSelectablePartner (component)
Task-3046287

[IMP] mail: rename ChannelInvitationFormSelectedPartner (component)
Task-3046288

[IMP] mail: rename ChannelMember (component)
Task-3046298

[IMP] mail: rename ChannelMemberList (component)
Task-3046306

[IMP] mail: rename ChannelMemberListCategory (component)
Task-3046307

[IMP] mail: *: rename ChatWindowHeader (component)
*: hr, im_livechat, website_livechat
Task-3046330

[IMP] mail: rename ChatWindowHiddenMenu (component)
Task-3046358

[IMP] mail: rename ChatWindowHiddenMenuItem (component)
Task-3046515

[IMP] mail, *: rename Composer (component)
*: hr_recruitment, im_livechat
Task-3046555

[IMP] mail: rename ComposerSuggestedRecipient (component)
Task-3046598

[IMP] mail: rename ComposerSuggestedRecipientList (component)
Task-3046624

[IMP] mail, *: rename ComposerTextInput (component)
*: im_livechat
Task-3046648

[IMP] mail: rename DeleteMessageConfirm (component)
Task-3046661

[IMP] mail, *: rename Discuss (component)
*: im_livechat
Task-3046685

[IMP] mail: rename DiscussMobileMailboxSelection (component)
Task-3046703

[IMP] mail: rename DiscussMobileMailboxSelectionItem (component)
Task-3046709

[IMP] mail, *: rename DiscussSidebar (component)
Task-3046719

[IMP] mail: rename DiscussSidebarMailbox (component)
Task-3046732

[IMP] mail: rename DropZone (component)
Task-3046739

[IMP] mail: rename FollowButton (component)
Task-3047154

[IMP] mail: rename Follower (component)
Task-3047203

[IMP] mail: rename FollowerListMenu (component)
Task-3047236

[IMP] mail: rename FollowerSubtype (component)
Task-3047272

[IMP] mail: rename MailTemplate (component)
Task-3047314

[IMP] mail, *: rename Message (component)
*: im_livechat, sms, snailmail, website_sale
Task-3047352

[IMP] mail: rename MessageAuthorPrefix (component)
Task-3047683

[IMP] mail, *: rename MessageList (component)
*: hr_recruitment, website_livechat
Task-3047718

[IMP] mail, *: rename MessageNotificationPopoverContent (component)
*: sms
Task-3047742

[IMP] mail: rename MessageSeenIndicator (component)
Task-3047765

[IMP] mail, *: rename MessagingMenuTab (component)
*: im_livechat
Task-3047802

[IMP] mail: rename MobileMessagingNavbar (component)
Task-3047806

[IMP] mail, *: rename NotificationGroup (component)
*: sms, snailmail
Task-3047829

[IMP] mail, *: rename NotificationList (component)
*: im_livechat
Task-3047871

[IMP] mail: rename NotificationRequest (component)
Task-3047883

[IMP] mail, *: rename PersonaImStatusIcon (component)
*: hr_holidays
Task-3047969

[IMP] mail, *: rename ThreadIcon (component)
*: hr_holidays, im_livechat
Task-3047980

[IMP] mail, *: rename ThreadNeedactionPreview (component)
*: im_livechat, rating, test_mail_full
Task-3048021

[IMP] mail, *: rename ThreadTextualTypingStatus (component)
*: im_livechat
Task-3048042

[IMP] mail, *: rename ThreadTypingIcon (component)
*: im_livechat
Task-3048043

[IMP] snailmail: rename SnailmailError (component)
Task-3048051

[IMP] website_livechat: rename VisitorBanner (component)
Task-3048069

Task-3047725

closes odoo/odoo#104548

Related: odoo/enterprise#33411
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-28 20:39:58 +02:00
Brieuc-brd 8b1e5a8708 [FIX] website_livechat: adapt visitor banner for dark mode
This commit adapts the `o_VisitorBanner` background for dark mode

task-2710677

X-original-commit: f3c6f50ed17d7fdf3f1286830d5feeb6bc9b0b57
Part-of: odoo/odoo#103162
2022-10-25 15:03:28 +02:00
Louis Wicket (wil) fa4c0103bd [IMP] website_livechat: move code to models (VisitorBanner)
- Create VisitorBannerView model
- Pass record as props
- Turn other props on component into fields on model
- Remove export default

Task-3004301

closes odoo/odoo#102387

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-11 17:59:02 +02:00
Alexandre Kühn cf34560383 [FIX] im_livechat, *: Fix broken test page of chatbot
*: website_livechat

Task-3006246
Task-3010911

closes odoo/odoo#102985

X-original-commit: 59002571344405ce4fb691761f62d4fb909ffc17
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-11 14:10:02 +02:00
Alexandre Kühn 36346eb1d0 [IMP] im_livechat, *: Show Livechat Button with notification
*: mail, website_livechat

This commit adds new option in Livechat Button visibility
"Show with notifcation", which allow to see livechat button
and also display a customizable floating text next to button.

This text appears 1 second after the livechat button become visible.

Task-2937993

closes odoo/odoo#102930

X-original-commit: 785356f46b49d1b3d9b975319c87f39266694b82
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-10-10 18:08:48 +02:00
luvi 782a1dd3b9 [REF] website, *: adapt code to save on NewContentModal close
*: website_blog, website_event, website_forum, website_livechat,
website_sale, website_slides

This commit adapts the code of website, and modules depending on it, which
overrided the save method of the FormView controller to execute a doAction.

It was no longer possible to wait for the default save action to proceed,
because the default behavior is now to close the dialog, and here we need
to pass another parameter allowing to redirect the website to a newly
created record.

Now, a method is available directly from the NewContentModal, which reduces
the need for the service in form views. The save call pass the right method
to compute the path needed for the redirection once the record has been
created.

closes odoo/odoo#102522

X-original-commit: 916a5bebb3e74047a66503ddc59299540c252831
Related: odoo/enterprise#32448
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-06 23:14:25 +02:00
Louis Wicket (wil) d562840f69 [IMP] mail, *: refactor patch API to look like model definitions
Model patches are now defined using the `registerPatch` function. This
function takes an object as argument which keys match those of a model
definition.

Benefits:
+ More consistent shape between model definitions and patch definitions
+ No need to import one function to each type of patch
+ No need to repeat the model name for each type of patch
+ No need to import the original definition

Task-2998282.

* = calendar, crm, hr, im_livechat, note, rating, sms, snailmail,
    website_livechat, website_slides

closes odoo/odoo#101827

X-original-commit: 7d23491b44b7372209057ea2abc565a95710b316
Related: odoo/enterprise#32136
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-10-03 16:18:49 +02:00
Jeremy KerstenandBenoit Socias 878351d840 [IMP] base, web, website, *: differentiate essential & optional cookies
*: im_livechat, survey, utm, website_crm_iap_reveal, website_forum,
   website_livechat, website_sale, website_sale_comparison

Before this commit all cookies were considered essential.

This commit makes some of them optional. It also makes it possible for
the website visitor to only accept the essential cookies.

task-2800976

X-original-commit: 9a8a9463289a7446e9be0ef62ff895feb37a4de4
Part-of: odoo/odoo#101845
Co-authored-by: Benoit Socias <bso@odoo.com>
2022-10-03 10:56:58 +02:00
Alexandre Kühn 5b59a07729 [IMP] mail, *: introduce public livechat bundle
*: hr, im_livechat, snailmail, website_livechat

This commit introduces the public livechat bundle, which
contains the models that are specifically used in public livechat.

Doing so reduces the amount of model and data in frontend and
external lib, which makes the page load faster.

Task-2990182
Task-2990191

closes odoo/odoo#100768

Related: odoo/enterprise#31608
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-22 15:50:12 +02:00
Alexandre Kühn 0ae4fadf08 [IMP] mail, *: convert all compute/sort method into inline field function
Task-2985304

closes odoo/odoo#100765

X-original-commit: e267d52cc4380c3acf7d2f9c9abf1acb59a598c1
Related: odoo/enterprise#31606
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-22 01:54:20 +02:00
Pratik Raval 8fa6f28f45 [IMP] website_livechat: hide livechat in edit mode
Currently, while designing the website (i.e we are in edit mode), the
livechat button (or chat window) is visible.

After this commit, the livechat button/window will be hidden while website
editor is enabled.

TaskID-2824363

closes odoo/odoo#89131

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-09 14:40:53 +02:00
xO-Tx d7a5a06c68 [REF] website, *: use OWL views for new content
*: website_blog, website_event, website_forum, website_livechat,
website_sale, website_sale_slides, website_slides, website_slides_forum

The goal of this commit is to adapt the website "new content" form
views to OWL.

Follows the merge of the "website in backend" task at [1].

[1]: 31cc10b91d

task-2687506

Part-of: odoo/odoo#96346
2022-09-04 14:39:44 +02:00
Alexandre Kühn aecdc50278 [IMP] im_livechat, *: Refactor JS Public Livechat (step 16)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2965839

closes odoo/odoo#99137

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-30 02:51:08 +02:00
Alexandre Kühn c0532b6aec [IMP] im_livechat, *: Refactor JS Public Livechat (step 15)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2963842

closes odoo/odoo#98987

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-27 03:33:58 +02:00
Alexandre Kühn 357b4437f7 [FIX] website_livechat: introduce Visitor/serverCountry
Fixes a traceback due to Visitor/country being a computed field
that is imperatively updated by server data.

Task-2962126

closes odoo/odoo#98847

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-26 03:43:17 +02:00
Alexandre Kühn 34c88157a6 [IMP] im_livechat, *: Refactor JS Public Livechat (step 14)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2961782

closes odoo/odoo#98798

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-25 04:21:01 +02:00
Matthieu Stockbauer fe699a241d [IMP] *: adapt client code to use websocket instead of longpolling
*: bus, calendar, hr_attendance, iap_mail, im_livechat, project, snailmail,
snailmail_account, survey, web, web_editor, website_livechat.

This commit is part of the websocket integration in Odoo.
This bus service now communicates with a shared worker in order to provide
a single websocket connection for multiple tabs. It is designed to
be used as a websocket except that events are slightly different,
re-connection is handled automatically. If the browser does not support shared
worker (Safari), the service fallback on a simple web worker.

Available events are:
   - connect : fired upon a successful connection.
   - disconnect : fired upon reception of the websocket close event.
     The close code and reason are given to the listeners callback.
   - reconnect : fired upon a successful re-connection.
   - reconnecting : triggered when the worker starts to try reconnecting.
   - notification : fired upon the reception of notifications.

Since multiple tabs are now handled by a worker, the cross_tab bus is no longer
required and has been removed.

Part-of: odoo/odoo#75510
2022-08-23 17:55:10 +02:00
Sébastien Theys 34d775e873 [IMP] mail, *: remove explicit usage of insert-and-replace
* = calendar, im_livechat, rating, snailmail, test_discuss_full, test_mail,
    website_livechat

Distinction between "replace" and "insert-and-replace" can be guessed based on
the type of the provided data.

task-2957295

closes odoo/odoo#98404

Related: odoo/enterprise#30580
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-19 11:53:05 +02:00
Louis Wicket (wil) 5d43fad9e6 [IMP] mail, *: auto add implicit attributes of identifying fields
Automatically add `required` and `readonly` on identifying fields and
remove them from field definition.

Task-2955910.
* = calendar, hr, im_livechat, rating, snailmail, website_livechat

closes odoo/odoo#98283

Related: odoo/enterprise#30511
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-17 19:48:53 +02:00
Rahul Prajapati 4123505efa [IMP] *: have replace as default command on update
* im_livechat, mail, snailmail, website_livechat

PURPOSE:

A `replace` command should be default while updating a field.

SPECIFICATION:

- If no command is passed while updating a field, add a `replace` command as
default.
- Remove all the existing occurrences of `replace` command.

Task-2851488

closes odoo/odoo#95885

Related: odoo/enterprise#30494
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-17 19:48:11 +02:00
Sébastien Theys 60c87dd426 [IMP] mail, *: introduce identifyingMode and remove identifyingFields
* = calendar, hr, im_livechat, rating, snailmail, website_livechat

This simplifies definition and overrides and opens up new identification
opportunities.

Part of task-2741982

closes odoo/odoo#98166

Related: odoo/enterprise#30470
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-08-17 11:21:40 +02:00
Alexandre Kühn f2d3a5bbd4 [IMP] im_livechat, *: remove Promise.reject in LivechatButton
*: website_livechat

closes odoo/odoo#98160

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-16 17:50:03 +02:00
Alexandre Kühn b7b4161873 [IMP] im_livechat, *: Refactor JS Public Livechat (step 13)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2943607

closes odoo/odoo#97403

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-03 19:33:53 +02:00