Step to reproduce:
- Settings -> Mail channel -> any chat-type channel
- Go to Members
- Add an user
- Refresh the page
Current Behaviour:
- Traceback
- Chat are designed for 2 users and you should not be able to add more
Behaviour after PR:
- Can only edit members of channel if it's not a chat
- User error if try to add more user
- Fix traceback if there is too much users
opw-2717341
closesodoo/odoo#82044
X-original-commit: 85f7b7c1304222966610833dc325bc47f1c13158
Related: odoo/enterprise#23156
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In preparation for using OWL v2 in discuss code.
(shouldUpdateBasedOnProps will be removed)
Solution consists of introducing MobileMessagingNavbarView model.
Task-2695743
closesodoo/odoo#80617
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Rename javascript model `mail.discuss_sidebar_category` to
`DiscussSidebarCategory` in order to distinguish javascript models from
python models.
Part of task-2701674.
closesodoo/odoo#81345
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.partner` to `Partner` in order to
distinguish javascript models from python models.
Part of task-2701674.
* = hr, hr_holidays, im_livechat, website_livechat
closesodoo/odoo#81406
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.discuss_sidebar_category_item` to
`DiscussSidebarCategoryItem` in order to distinguish javascript models
from python models.
Part of task-2701674.
closesodoo/odoo#81367
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.discuss` to `Discuss` in order to
distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81335
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.thread` to `Thread` in order to
distinguish javascript models from python models.
Part of task-2701674.
* = hr, hr_holidays, im_livechat, website_livechat
closesodoo/odoo#81433
Related: odoo/enterprise#22910
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.messaging_notification_handler` to
`MessagingNotificationHandler` in order to distinguish javascript models
from python models.
Part of task-2701674.
* = im_livechat, website_livechat
closesodoo/odoo#81389
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/odoo#81387
Related: odoo/enterprise#22889
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.chat_window` to `ChatWindow` in order to
distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81322
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Avoid iterating over all channels every time a new channel is added.
Part of task-2702450
closesodoo/odoo#81264
X-original-commit: 7686be710ba919079f6ea97293ac99dde79f843b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Avoid iterating over all channels every time a new channel is added.
Part of task-2702450
closesodoo/odoo#81235
X-original-commit: f5958f7ae15acff6a1ab6fc1bdf795b4c1f1e071
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
* = 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
closesodoo/odoo#79259
Related: odoo/enterprise#22042
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
* = auth_signup, calendar, im_livechat, snailmail_account, survey, test_mail,
web_editor, website_crm_iap_reveal, website_livechat
The aim of this PR is to improve/fix various flaws and limitation of the current
API, to make it easier to use and more efficient.
Notification are now defined with 3 distinct parts:
- the channel determines which client(s) should receive it
- the type determines how it should be handled
- the payload determines any extra information helpful for handling it
Channel
=======
Business code
-------------
- Record channel is introduced for ease of subscribing to and sending
notifications to specific partners, channels, documents, ...
- String channel is still supported (but it is converted internally to the tuple
channel).
- Tuple channel is still supported without any change (but should be avoided
whenever possible due to its complex syntax).
The channel is no longer sent to the client. When the channel was used for
business purpose, the information it contained has been moved into either the
new type, or the payload itself.
Technical note
--------------
All channels are now internally converted to the tuple (db, ...) channel, which
is necessary for the platform code (saas/sh).
Internally, the bus.bus table is not changed, type and payload are grouped
together into what was (and still is) called message.
Type
====
Type is introduced to uniformize the way notifications are sent and handled.
All existing notifications already had some kind of manually-built type in them.
This is now officially supported at the bus API.
In client code this will allow (to be done in future commits) to register one
handler per specific type, instead of having to iterate and to filter all
received notifications on every handler.
Payload
=======
Payload (ex message) did not change, it can still be anything depending on
business needs.
Few adaptations:
- When the type was included on the payload, the type has been moved to the new
type parameter.
- When the channel was used in business code, its data has been copied into the
payload.
task-1891151
closesodoo/odoo#79201
X-original-commit: 543af27c7d6836ffac9e80ff8490b6ddbd849221
Related: odoo/enterprise#21998
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit intends to fix two strange bugs encountered while trying to
push a new component into the systray menu:
- MessagingMenuWidget and RtcActivityNoticeWidget were removing their
parent node via DOM manipulations when attached in the DOM. This caused
a crash when adding other items to the systray menu since the deleted
nodes were actually managed by OWL.
- The t-foreach directive in the navbar used indexes as the t-key, which
led mapping items subsequently added to wrong templates.
closesodoo/odoo#78784
X-original-commit: 5f0f80da4fc951954d253c9e45defd591605f556
Related: odoo/enterprise#21829
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Ooming <oomsveta@users.noreply.github.com>
* = hr, hr_holidays, sms, snailmail, website_livechat
Message model incorrectly contained data related to a specific component (only
one) even though there can be multiple message components per message model.
This cascaded to adapting related component/models to the same principle.
closesodoo/odoo#76718closesodoo/odoo#77779
Related: odoo/enterprise#20964
Related: odoo/enterprise#21426
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
* = 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
closesodoo/odoo#75496
Related: odoo/enterprise#20417
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The commit is to refactor the discuss sidebar
- threads are now organized in categories based on the thread type e.g. chat, channel
- categories can be folded or unfolded by clicking the category title
- for active thread, even if the category is folded, it remains under the category title
- for channel category, a new cog button is added to view all channels
- the active indicator bar is removed. The active item now is highlighted with a different background color
- thread avatar is used for livechat, chat and channel
- for livechat and chat, threads are now sorted by last activity time (pin or message exchange)
closesodoo/odoo#70986
Task-id: 2440073
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: hr_holidays, im_livechat, sms, snailmail, website_slides
Most messaging related components have common needs concerning
subscribing to model changes, and not needing to be rerendered unless
their props change. Previously, most components would call the hooks
"useModels" and "useShouldUpdateBasedOnProps" individually. Messaging
components also depend on one another quite a bit, requiring a lot of
explicit imports of other components. It would also be useful to be able
to have cyclic dependencies between component (eg Message renders a
component that allows to delete the message, and the delete component
renders the message in a confirmation dialog), but that doesn't work
with explicit imports (the odoo module system doesn't support cyclic
dependencies).
This commit adds a Component decorator that:
- Registers the component in an internal registry
- Makes all components in this registry available at render time to
components that have been registered in this way
- Calls the useModels and useShouldUpdateBasedOnProps hooks during
component initialization (setup)
enterprise PR: odoo/enterprise#20304closesodoo/odoo#74982
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
* = im_livechat, test_mail
The goal of moving it in models and making it independent of current user is to
be able to test it easily in future commits.
Part of task-2622462
* = 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
The dependencies of the public_root module were recently updated, but
the manifest of im_livechat was not, causing it to fail to load. This
commit adds those missing dependencies to the manifest.
This commit also adds a test that checks that all modules are properly
loaded on the support page, since this has been broken on multiple
occasions while changing the dependencies or the path of some of the
modules this page needs to work.
closesodoo/odoo#74756
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Opportunity is taken to clean the various follow/join/invite methods into only
one `add_members` method.
Part of task-2360169
closesodoo/odoo#74425
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
It is a feature we would like to have, but it currently doesn't work well.
- Search is text based, but messages are HTML based, which means a lot of result
make no sense because they match HTML tags, attributes, ... Inversely when
searching for multiple words that do exist together but are separated by tags,
it will fail to find them.
- Content of messages is actually not indexed, which means the search doesn't
scale in big channel or with long messages. Indexing it is not trivial and has
a huge cost in terms of storage and dependencies (trigram index for example).
- The search of the control panel is great for business documents but it does
not fit the kind of searching UI that we would like inside discussions.
It is therefore decided to remove the feature until we are able to do it well.
Part of task-2369636
More information also on task-2359037
closesodoo/odoo#73903
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Mark the message body as safe pretty much as soon as we receive the
message from the server:
* when receiving message-type notifications
* while loading history
Also reorder history loading a bit while at it:
* convert willStart to async
* immediately reverse & wrap history right there, seems unnecessary to
wait until willStart since `reverse()` works in-place anyway
* when loading messages into the thread, `_.each` seems unnecessary,
Array#forEach will do fine
Purpose
=======
Remove the "email_send" field on the <mail.channel> (mass_mailing named
on the JS side).
This feature will be introduced with a new model (<mail.group>) in a
new module in the next commit.
Remove the email notification support on the channel, so now the mail
channels work only by chat.
Remove the "subject" on the Discuss side because this was used only on
"email" channel.
Technical
=========
In the mail channel model we can drop the usage of the blacklist as well
as the usage of the "email_to" field. Those two features were mainly
used for mailing list and have no utility for "chat like" channel.
Links
=====
Task-2510267
See odoo/odoo/pull/71599
See odoo/enterprise/pull/19296
See odoo/upgrade/pull/2600
* = hr, hr_holidays, im_livechat, sms, snailmail, website_livechat,
website_slides
Exporting directly on the line of the class or variable definition is less lines
of code and less repetition (and risk or mistake).
Exporting with a name instead of default allows to catch typos more easily when
importing and ensures the same name is used for consistency (and ease of grep).
closesodoo/odoo#72597
Related: odoo/enterprise#19224
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit adapts the community codebase to the rewriting of the
/web application in owl.
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.
Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient
Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.
closesodoo/odoo#69819
Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Slightly improve the overall UI of Odoo with a more modern feel by updating the
current 'loading' icons that look quite old school.
Use fa-circle-o-notch instead of old style fa-spinner
task-2346142
closesodoo/odoo#59454
Related: odoo/enterprise#13908
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Some features of the PDF.js library doesn't work in the
webview of the mobile apps.
Initially 'window.print' is defined as an empty function in
webviews unlike browsers where it is already ready.
After that, PDF.js needs to monkey patch 'window.print' and
saves a reference to the original definition, which is not
yet fulfilled in by the mobile app (Java part).
So the print of PDF.js doesn't work in webviews and end
users will need to download the file before printing it.
Regarding the Download button, the 'download' attribute is
not supported by the webview as you can see in:
https://bugs.chromium.org/p/chromium/issues/detail?id=432414
As there's many ways to download a file in Odoo it's not
a big deal to simply hide it in PDF.js.
Because it's quite complicated to fix this, we decided
to hide the features that don't work (Download / Print)
or don't make sense (Open file).
Task-id: 2200168
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
closesodoo/odoo#69830
Related: odoo/enterprise#17936
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
RATING
Rating texts currently have a negative skewness. Indeed apart top rating
all ratings have a negative feeling. In this commit we update them
to match more closely a 1-5 range from dissatisfied to satisfied, ok being
the middle value.
PROJECT
Filter customer rating were taking in account ratings from first e-mail
instead of current satisfaction.
IM LIVECHAT
Livechat did not catch feedbacks without comment.
Task ID-2439720
COM PR odoo/odoo#66992
ENT PR odoo/enterprise#16757
This commit applies missing style rules to external livechat window
in order to make it look like the internal version of the livechat window.
Task ID-2301261
PR odoo/odoo#60549
X-original-commit: da1d2ca0c593e6179b166f94f2e280445e059da7
Fix issues in livechat display
* rename Rated user filter into Rated Operator
* add padding to improve readability of the feedback screen in the livechat
window.
* fixed URL in placeholders to match existing "contactus" page URL
Task ID-2301261
PR odoo/odoo#60549
X-original-commit: 60e27876bb7ccdd6a6f871db82d44ac194b6f739