Commit Graph
16 Commits
Author SHA1 Message Date
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
tsm-odoo 71d5af4ce0 [FIX] bus, *: fix onNotification/offNotification
*: im_livechat, snailmail_account, survey, web_editor.

The callback registered by the bus service method onNotification was
not the same unregistered by offNotification. Since those method were
superfluous, they have been removed in favor of (add/remove)EventListener.

closes odoo/odoo#96684

Related: odoo/enterprise#29819
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-27 16:34:10 +02:00
tsm-odoo 3b9a90e14f [IMP] bus: replace on/off by (add/remove)EventListener
on/off are deprecated in favor of  addEventListener/removeEventListener.
Calls to the bus service have been updated to reflect those changes.

task-2053917

closes odoo/odoo#96017

Related: odoo/enterprise#29501
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-18 18:41:33 +02:00
tsm-odoo 27b472e5ed [IMP] bus, *: remove obsolete web_client_ready when using bus
*: calendar, iap_mail.

Now that the bus service is a wowl service, we don't need to wait for
the webclient to be ready before using it. Indeed, the services now
have the bus service as a dependency which means it will always be ready
in time. This also showed that the rpc service was missing as a bus service
dependency. It has been added.

Some part of the code were also checking if the bus service was in
`env.services`. Those calls have been removed as well since we now
have the guarantee that it is.

closes odoo/odoo#96002

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-14 16:42:19 +02:00
Matthieu Stockbauer 3ae11c87e8 [IMP] mail, *: adapt bus service to wowl env.
*: bus, calendar, iap_mail, im_livechat, project, web.

In order to ease the PR introducing the websockets in Odoo, the bus service
has to be updated to be a wowl service. This PR takes care of it.

task-2053917

closes odoo/odoo#95824

Related: odoo/enterprise#29361
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-14 11:42:42 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Victor Feyens 42bad1a6d2 [IMP] *: remove useless keys from manifests
Remove most values uselessly specified because giving the same value as 
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)

* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default

This will reduce noise/inconsistencies between manifests specifications, 
simplify analysis of manifests content, ...

closes odoo/odoo#90209

Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-03 13:31:16 +02:00
sofiagvaladze f6030aeecc [FIX] iap_mail: Remove messageIsHtml from IAP failure notification
Before the fix:
When we don't have enough credits for Bill Digitalization,
try to scan expense from expense app (or upload bill from billing).
Instead of getting 'Not enough credits for Bill Digitalization',
we are getting 'Odoo Client Error'.

That is because messageIsHtml is no more prop to component 'Notification'.

closes odoo/odoo#84701

Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-02-16 16:57:20 +00:00
Martin Trigaux 9fbf706ba8 [I18N] *: export saas-15.2 translations
closes odoo/odoo#84475

X-original-commit: 8ea2605fbfec6277d7a01b6e73548a9585866c61
Related: odoo/enterprise#24289
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-02-14 10:44:50 +00:00
Prakash PrajapatiandNisha Patel fe86b687a6 [IMP] snail(mail),crm_(iap)_lead_enrich: improve the iap notification
The purpose of this task is to use the notification which we currently
have for partner autocomplete and to generalize it to our other IAP
services.

So in this commit, we improve the iap notification for the below views
-> we display a toast in green when the request was successfully completed
   (and the  user has enough credits).
 - when a letter is sent in batch from the list view
 - when leads are enriched in batch from the list view
-> we display a toast in orange when the user doesn't have enough
   credits with a corresponding 'buy credits' link to the service.
 - when a letter is sent in batch from the list view
 - when leads are enriched in batch from the list view or when
   clicking on 'enrich' from the form view
 - when creating a new lead mining request

task-2185306
closes odoo/odoo#66977

Related: odoo/enterprise#16736
Signed-off-by: Arnaud Joset <arj@odoo.com>
Co-authored-by: Nisha Patel <nit@odoo.com>
2022-01-21 15:03:57 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
ijas ahammed 6113a8c48c [IMP] iap_mail: improve the UI for 'enrich_company' template
Currently, when sending the mail for enrichment with template
`enrich_company`, we display few data with pills, like phones,
emails, industries, sectors etc. When there are too many pills
for these information, pills sometimes break into another line
if there's no enough space and the mail looks ugly.

This commit improves the behavior by improving the inline style
for those pills, and thus by making sure that it will always
display entire information in one line, instead of breaking
them into multiple lines.

Apart from that, this commit also makes the template responsive
so that is doesn't look mess in Odoo's chatter while viewing
from small devices.

TaskID-2577809

closes odoo/odoo#72507

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-16 13:21:31 +00:00
Thibault Delavallée 78c68f4b88 [MOV][IMP] mail, iap_*, portal: reorganize qweb / jinja templates used for mailing
PURPOSE

Clean organization of templates in odoo apps: mail.template records in data,
qweb templates (views) used directly in code, notably using post with view.
Purpose is to ease future improvements in posting based on templates.

SPECIFICATIONS

  * move those templates in their own file to ease their discovering and
    maintenance;
  * put them into data (as those are not views even if it contains qweb)
  * guidelines are now :

    -> Qweb templates should be in data/mail_templates.xml;
    -> mail.template records should be in data/mail_template_data.xml;

  * put their declaration in no update when not done if template has no
    technical code or complex dependency on underlying code;
  * move found mail data (mail.message.subtype or mail.activity.type) records
    in a mail_data file that should contain only "core" records linked to mail;

LINKS

Task ID-2375767
COM PR odoo/odoo#61814
ENT PR odoo/enterprise#14775
UPG PR odoo/upgrade#1936
2020-11-25 12:29:57 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
Christophe Monniez 01679de3e5 [FIX] iap_mail: fix packaging
During the packaging for the src/deb/rpm, only regular package are taken
into account. Without an `__init__.py` file, the iap_mail is not
packaged and the whole Odoo packaging process is failling.

closes odoo/odoo#56260

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-21 06:59:35 +00:00
Thibault Delavallée 323890f7ea [ADD] iap_mail: bridge between mail and iap
PURPOSE

Clean and improve IAP services integration in Odoo. Clean IAP integrations
tools and improve data sharing with base modules, notably for CRM and Partner.

SPECIFICATIONS

In this commit we create a bridge module between iap and mail to hold notably
some notification data. It includes a template shared by several iap modules.

We also move its override in the right file and clearly rename assets file
in crm_iap_lead in order to clean a bit module organization.

LINKS

Task ID-2248367
Community PR odoo/odoo#53214
Enterprise PR odoo/enterprise#11258
Upgrade PR odoo/upgrade#1363
IAP PR odoo/iap-apps#191rade#
2020-08-18 11:41:59 +00:00