Commit Graph
181 Commits
Author SHA1 Message Date
Martin Trigaux 2afdda2576 [I18N] *: export saas-16.3 source terms
closes odoo/odoo#123046

X-original-commit: 137f5ca0cb703ee953cb01db525362f7a778e6bd
Related: odoo/enterprise#41703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-01 11:43:51 +02:00
Louis Wicket (wil) 04189318cc [I18N] *: update master translations
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.

This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).

closes odoo/odoo#121629

Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-22 17:52:07 +02:00
Brieuc-brd fa60bac197 [IMP] *: app icons : add viewBox attribute
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.

This commit fixes this issue.

task-3326633
Part of task-3326263

X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
2023-05-22 13:54:08 +02:00
Martin Trigaux 077bbd0b0b [I18N] *: export master source terms
closes odoo/odoo#121563

Related: odoo/enterprise#41140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-17 10:34:00 +02:00
Brieuc-brdandElisabeth Dickinson 21d87a3da5 [REF] *: milk graphical assets
- apps icons
- base: replace demo avatars Mitchell, Marc and Joel
- mail: replace odoobot avatar

Part-of: odoo/odoo#116641
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-05-12 22:59:14 +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
Martin Trigaux 69f911d994 [IMP] *: enforce usage of Markup in mail
When using message_post, the body format must be explicitly specified.
If html is expected, a Markup object should be used.
If text is given, the content will be escaped.

Before this PR:
message_post was unaware if the content of a message was HTML or
text. This lead to multiple situation where the content was
incorrectly considered as HTML and led to display errors.
In
  self.message_post(body="Hello %s!" % self.name)
if the name contained HTML, it would be evaluated.

In
  self.message_post(body="Contact Raoul <raoul@caramail.be>")
the email would not be displayed as considered as unknown HTML and
discarded by the sanitizer

Now each call must explict the type of content.
Use the escape() helper to properly combine Markup and translations.
It would also be acceptable to use Markup() to wrap a static
translation but escape is better as one can not guarantee the content
of a translation.

closes odoo/odoo#111850

Related: odoo/documentation#3612
Related: odoo/enterprise#36728
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-13 16:39:48 +02:00
tsm-odoo 87147c935f [FIX] mail_bot: fix mail bot onboarding tour display
Before this PR, the mail bot would have answered to every incoming
messages including system notifications. Answering to system
notifications makes no sense and leads to the answer being formatted
as a notification since the mail bot copies the message type of the
message being answered.

This PR fixes the issue by preventing the mail bot from answering
anything else than comments.

task-3044856

closes odoo/odoo#104636

X-original-commit: bb76e083d5adcc955967680c46b9cf2e39402783
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-10-31 18:52:59 +01:00
stefanorigano (SRI) 3fb351e4de [IMP] mail: adapt for dark-mode
This commit adapts several components in order to correctly handle
color-scheme variations.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:53 +02:00
Martin Trigaux 1a8772769e [I18N] *: export 16.0 source terms
closes odoo/odoo#100573

Related: odoo/enterprise#31507
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-20 13:48:49 +02:00
Florian Charlier dae28c4b46 [IMP] base: add _is_internal method to res.users
No method was readily available to know if a user is `internal` (has
group `base.group_user`), which was inconsistent with other base groups.

_is_internal is now used in the codebase where it is clear that
`.has_group('base.group_user')` is called on a single record.

Part-of: odoo/odoo#85703
2022-06-14 09:35:57 +02:00
Martin Trigaux 5acb6db891 [I18N] *: export saas-15.4 source terms
closes odoo/odoo#93246

X-original-commit: 5ff6d185f70650c26c28a6aef7dd37c859ab58d2
Related: odoo/enterprise#28218
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-10 07:27:26 +02:00
Fabio Barbero fc79bd1e0e [IMP] sm modules: "neutralise" genders
Purpose
=======
Change all masculine nouns in Odoo's code to neutral nouns (when
possible), making sure that demo data is correctly handled. This is
particularly important since our code is open source, and nowadays lots
of machine learning models are trained on open source repositories.

With this small change we contribute to training more "fair" models, and
teaching models that "employee" or "user" != "he".

This also affects some text visible by the user, hence making it more
inclusive for Odoo users.

Task-2853046

closes odoo/odoo#91292

Related: odoo/enterprise#27302
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-16 10:09:32 +02:00
tsm-odoo 4549de3b61 [IMP] mail_bot: don't use session for odoobot initialization
This PR prepares the ground for the one introducing the new environment in the
mail module. Indeed, the mail_bot messaging_initializer relies on the session
in order to known when to initiaze odoobot. With the new env, we won't be able
to access the session but will instead override init_messaging to automatically
initialize odoobot. Doing this first reduces the noise in the main PR.

task-2582313

closes odoo/odoo#90291

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-03 16:55:00 +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
Victor Feyens c3b9c0d8a2 [FIX] *: typos in translated strings
closes odoo/odoo#89718

Related: odoo/enterprise#26630
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-02 21:36:40 +02:00
tsm-odoo 0b60725288 [IMP] mail, *: add rpc to messaging
*: calendar, hr, im_livechat, mail, mail_bot, snailmail, website_slides.

This PR prepares the ground for the one introducing the new env in discuss.
The signature of the rpc function has changed a lot from the one in the old env.
In order to ease the transition and reduce the noise, the discuss models now
rely on the messaging's rpc function.

task-2582313

closes odoo/odoo#89858

Related: odoo/enterprise#26676
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-29 11:01:18 +02:00
tsm-odoo 1da8863a7d [IMP] mail: adapt remaining tests data seeding
task-2792108

closes odoo/odoo#87430

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 13:04:58 +02:00
Louis Wicket (wil) ee9759a144 [MOV] mail, *: move utils files up
* = calendar, hr, hr_holidays, im_livechat, note, sms, snailmail,
test_mail, website_livechat, website_slides
Task-2759586

closes odoo/odoo#86791

Related: odoo/enterprise#25491
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 13:39:56 +01:00
tsm-odoo 2538a71944 [IMP] mail, *: make mail tests stop relying on this
*: hr_holidays, im_livechat, mail, mail_bot, sms, snailmail, test_mail,
website_livechat, website_slides.

Mail tests are currently relying on this during tests to make env, widget,
data available. We don't wan't to add magic keys to this anymore.

task-2792108

closes odoo/odoo#86559

Related: odoo/enterprise#25341
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-17 19:30:08 +01:00
Louis Wicket (wil) e16976ddfc [IMP] mail, *: move up model files
Move model definition files from `models/thing/thing.js` to
`models/thing.js` and remove the now empty intermediate directory.

Task-2759582
 * = calendar, crm_livechat, hr, im_livechat, mail_bot, sms, snailmail,
     website_livechat, website_slides

closes odoo/odoo#86464

Related: odoo/enterprise#25291
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-17 11:27:59 +01:00
Louis Wicket (wil) df147ac6f2 [IMP] mail, *: move model tests into/static/tests
* : mail_bot, website_livechat
Task-2759560

Part-of: odoo/odoo#86464
2022-03-17 11:27:59 +01:00
tsm-odoo b15959cd95 [IMP] mail, *: make start method handle cleanup
*: calendar, hr, hr_holidays, im_livechat, mail, mail_bot, note, sms, snailmail,
website_livechat, website_slides.

This commit prepares the removal of beforeEach function in the
mail test suite. Cleanup was relying on beforeEach adding widgets,
components, unpatch method 'this'. We need to clean things up without
using either beforeEach or 'this'.

task-2792108

closes odoo/odoo#86526

Related: odoo/enterprise#25326
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-16 16:07:58 +01:00
Fabien Pinckaers 10a5796d4b [IMP] speed up load_menus() by using SVG icons instead of png
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.

Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)

closes odoo/odoo#84280

Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-02-12 08:55:18 +00:00
Louis Wicket (wil) c8cfc58ea8 [IMP] mail, *: rename messaging initializer model
Rename javascript model `mail.messaging_initializer` to
`MessagingInitializer` in order to distinguish javascript models from
python models.

Part of task-2701674.
* = crm_livechat, im_livechat, mail_bot

closes odoo/odoo#81387

Related: odoo/enterprise#22889
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 00:10:51 +00:00
Louis Wicket (wil) 2cb3f774a1 [IMP] mail,*: change model declaration syntax
* = calendar, crm_livechat, hr, hr_holidays, im_livechat, mail_bot, sms,
     snailmail, website_livechat

This commit will change the declaration of the models with the aim of
getting closer to a plain JSON-object. It allows us to eliminate a wide
portion of boilerplate code, making the declaration shorter, more
declarative, and less redundant, but mainly, it prepares the ground for
further changes.

Task-2695223

closes odoo/odoo#79259

Related: odoo/enterprise#22042
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-23 17:53:46 +00:00
std-odooandnounoubensebia cd8e0e9f46 [IMP] base, *: hide non-relevant fields for portal users
Purpose
=======
Hide non-relevant fields for a portal user. E.G. we want to hide the
notification type,  the menu customization... Because those fields
make no sense for a portal user.

Force the non-internal user to receive notifications by emails since
they can not open Discuss.

Task-2508521

Part-of: odoo/odoo#77766
Co-authored-by: nounoubensebia <neb@odoo.com>
2021-11-09 14:45:49 +00:00
Louis Wicket (wil) 53a7c81276 [IMP] mail_bot: remove unused file
Remove unused file.

closes odoo/odoo#79183

X-original-commit: 65f1cacbc4c047233c807ba045f03e0c3b679cd1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-29 11:06:00 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +00:00
Louis Wicket (wil) 80d74e7ee0 [IMP] mail, web, *: add support for guest users
* = crm_livechat, hr, hr_holidays, im_livechat, mail_bot, purchase, sms,
    snailmail, survey, test_discuss_full, test_mail, web_editor, website,
    website_livechat

 - Create new model `mail.guest` for guests.
 - Rewrite some RPCs to target routes rather than model methods so that
   guests are able to use them.
 - Patch JS and python models to support guests.
 - Create a stand-alone page and boot the channel in it.

task-2494829

closes odoo/odoo#75496

Related: odoo/enterprise#20417
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-02 00:43:34 +00:00
Sébastien Theys 7582625ba7 [IMP] mail, *: remove magic from channel commands
* = crm_livechat, im_livechat, mail_bot, test_mail_full

Those are hard-coded methods just like any other, remove the magic call and the
need to forward them to the client at init.

Part of task-2622462
2021-08-11 18:02:37 +00:00
Martin Trigaux c7bac3dee0 [IMP] *: make ir.model.data helper private
No reason to interfact with them directly in RPC
2021-08-10 13:49:04 +02: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
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
Fabien Pinckaers a65f6a5872 [IMP] various: clean most urls to odoo's website
Pages changed on odoo.com so let's update links.

closes odoo/odoo#72707

Related: odoo/enterprise#19239
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-24 15:14:29 +00:00
Raphael Collet 35a9f6c27a [FIX] core: SELF_READABLE_FIELDS and SELF_WRITEABLE_FIELDS on res.users
Avoid setting up those lists with method __init__() on the model, since
the model's class no longer has the expected parent classes.
2021-05-06 07:30:24 +00:00
yograj tandel fa6222e7fd [REM] mail, *: remove bugfix files
currently, Across Odoo, there are bugfix folder in around 13 module,
New manifest system allows to add new files in stable so the bugfix files are no
longer required.

after this commit,
all the bugfix files are removed from all module.and all the code in those file
is maintained as per New manifest system.

Task : 2510653

closes odoo/odoo#69830

Related: odoo/enterprise#17936
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-04-27 08:34:58 +00:00
Qiuyu (QHO) bd67479316 [REF] mail, mail_bot, im_livechat, *: convert JS files to ES6 modules
task id: 2487514

closes odoo/odoo#69376

Related: odoo/enterprise#17749
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-04-19 13:33:35 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02:00
Krina Oza 036b7720d0 [IMP] various: Updated App icons for various modules
In this commit icons of the following modules are updated:

-fetmail
-hr_skills
-iap
-mail_bot
-microsoft_calendar
-partner_autocomplete
-payment_alipay
-payment_odoo_by_adyen
-payment_payulatam
-sale_timesheet
-sms
-snailmail
-test_exceptions

TaskID:2378861

closes odoo/odoo#62291

Related: odoo/enterprise#14958
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-25 11:09:53 +00:00
Martin Trigaux 1658473bf2 [FIX] *: rephrase, correct typos
Courtesy of Transifex's translators for reporting bad/unclear sentences.

closes odoo/odoo#62564

X-original-commit: 9b3b2e8d711e3be75b1faffaf6f4f8f4ec90186e
Related: odoo/enterprise#15038
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-30 07:07:58 +00:00
Krina Oza 42965b16cb [IMP] various: Update the app icons
Purpose of the task is to update the icon of the various modules.

So in this commitn updated App icons of the following modules:

-fetchmail
-iap
-mail_bot
-partner_autocomplete
-sale_timesheet
-sms
-snailmail

Related PR: https://github.com/odoo/enterprise/pull/14408

closes odoo/odoo#60817

Taskid: 2369682
Related: odoo/enterprise#14408
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-27 13:19:20 +00:00
Sébastien Theys 5b24206091 [IMP] mail_bot: auto install the module again
Its most glaring issues have been fixed.

task-2291904

closes odoo/odoo#56921

X-original-commit: b1efd7965a3b185b95bd30beca3d1b7f08165c8a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-02 08:46:22 +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
Sébastien Theys 590a088750 [FIX] mail, *: fix opens and redirects, adapt messaging menu close
task-2244279
task-2262862
task-2274993
task-2277537
task-2282238

closes odoo/odoo#56755

X-original-commit: 17611f4adc5e950b0a75a2a6615b1da3c956387f
Related: odoo/enterprise#12769
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-28 17:34:13 +00:00
Didier (did) bc5654f0a4 [IMP] mail, mail_bot: move notif request and OdooBot name into mail
task-2282334

closes odoo/odoo#56616

X-original-commit: bde23b82029507e525cf55d11b050af5f820a06b
Related: odoo/upgrade#1705
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-26 15:49:21 +00:00
Victor Feyens fdb23e282b [IMP] *: wrong any() usage
Replace wrong usages of any(list|recordset), by any(generator)
to speed up computations, avoiding list creations and/or looping twice on a recordset
for nothing.

any([generator]) => any(generator)
any(filtered) => any(generator)

closes odoo/odoo#55768

Related: odoo/enterprise#12360
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-08-14 09:56:10 +00:00
Sébastien Theys c2918c139b [IMP] web, *: improve mock server and replace most mail mockRPC
Improve mock server:

- add support for mocked `fetch`
- add support for `active_test`
- add support for x2m `in` in domains
- add support for default values computed from a function
- implement a more natural "next id" compute
- allow initial data without ids
- ensure write and x2m commands integrity
- improve bad data/bad commands error messages
- always warn for failing RPC, not only in debug mode
- fix all existing tests that had inconsistency data

Other changes done in mail (or dependents) that are not just related to tests:

- remove `direct_partner` from formatter result
  ->`correspondent` can be computed from other keys, especially `members`

- fix `livechat_visitor` convertData
  -> only process if there is value

- add `current_partner` and `current_user_id` as `init_messaging` result
  -> easier to mock than session

- remove usage of `need_moderation`
  -> that was just a search indirection to `moderation_status`

- adapt `partner_id` -> `res_partner_id` key in `_notification_format`
  -> to be consistent with field name

- add name in result of `mail_partner_format`
  -> sometimes display_name is not the same

- remove usage of `is_moderator`
  -> that was just an indirection to `moderation_channel_ids`

Enterprise counterpart: https://github.com/odoo/enterprise/pull/11523
task-2287171

closes odoo/odoo#55854

X-original-commit: 7ba3fecb3377a720d1eb70e7515a0c45da73836d
Related: odoo/enterprise#12391
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-13 16:26:35 +00:00
Sébastien Theys 64f7186843 [IMP] iap, mail_bot, snailmail: introduce tests_assets
Necessary to merge in saas-13.4: https://github.com/odoo/odoo/pull/53826

closes odoo/odoo#55056

Related: odoo/enterprise#12074
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-28 14:12:15 +00:00
Sébastien Theys 6da8fac5f4 [FIX] mail_bot: fix OdooBot not starting
- fix initializer start override (typo in method name)
- properly wrap async code in models
- disable OdooBot for System user
- use existing python method to create chat

task-2284584

closes odoo/odoo#53669

X-original-commit: 47bbfeab9e238ab542d16bf4ed17d60ad6aea50d
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-25 12:54:26 +00:00