Commit Graph
2976 Commits
Author SHA1 Message Date
Sébastien Theys 652d835f77 [FIX] mail: restore close of other menus on click of messaging menu
task-2278830

closes odoo/odoo#53566

X-original-commit: 0407151b34da16ca54066bb15e578dc1db85f365
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-06-24 10:22:58 +00:00
Xavier Dubuc ba744be937 [FIX] mail: fix folded new message chat window style
task-2272492

closes odoo/odoo#53565

X-original-commit: dcaa91ffb84a7d9ca433fff1913df47513bb365a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-24 10:22:35 +00:00
Alexandre Kühn 40793fde23 [FIX] mail: consistent relations between threads, caches and messages
task-2171881

closes odoo/odoo#53440

X-original-commit: 80d13bb828ee75a50d8cea29046a8eb49c71948a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-22 14:53:30 +00:00
Xavier Dubuc 7abea54433 [FIX] mail: fix attachment dialog
task-2279222

closes odoo/odoo#53437

X-original-commit: c61094bba21a4af567a68d3fb5d4a44352c667af
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-22 14:19:00 +00:00
Aaron Bohy 8abbc5a3b5 [REF] *: adapt code to web changes
Some changes in AbstractModel have been done to ease the
implementation of the sample data feature. This commit reverberates
those changes in other addons.

Part of task 2232801

X-original-commit: dd8069a3c80570e7fa03a80dbb100ab0a182692a
2020-06-22 13:04:02 +00:00
Sébastien Theys 47aea7ab16 [FIX] mail: add focus to composer when showing it from chatter
task-2224442

closes odoo/odoo#53096

X-original-commit: 7f571e490204d71882baf5a45b0b40cbada8d8da
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-16 17:08:03 +00:00
Sébastien Theys ac5138b19a [FIX] mail: restore style of messaging menu icon
- restore "solid" icon
- restore muted style when no notification
- opportunity is taken to fix off-pixel of activity menu

task-2278416

closes odoo/odoo#53094

X-original-commit: 1164b37c5fb33d124ede52356c613b7cd31ac8e1
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-16 16:28:03 +00:00
Sébastien Theys 97794679c0 [FIX] mail: fix messaging menu top alignment with other systray menu
task-2276039

closes odoo/odoo#53089

X-original-commit: 35cf5d4a186c51b2d43ff9a63b833767a65059f6
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-16 15:52:57 +00:00
Xavier Dubuc 4ca549253b [FIX] mail: mark message as seen only when thread composer is focused
task-2272510

closes odoo/odoo#53088

X-original-commit: edf356c2022b3039e53e82a092fc64533f59df27
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-16 15:52:34 +00:00
Xavier Dubuc d85ed51514 [IMP] mail: add docstring for unescaped fields
task-2269440

closes odoo/odoo#53051

X-original-commit: 683a524ac6fa74e786e13e6c1c0d6808b10b41ba
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-16 11:41:15 +00:00
3fea5b2136 [REF] mail, *: refactor messaging with OWL
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.

From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:

- models, which are logical entities that depict the client-side state of
  messaging as a whole.
- components, which are in charge of displaying information from models.

This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.

Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249

Task-1914207

This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.

closes odoo/odoo#39023

Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
2020-06-15 18:12:21 +00:00
Aymane (ayt) 8df6aec234 [IMP] mail, sms: support keydown based change event in char fields using an option
PURPOSE

Avoid flickering and incorrect display of warning box in SMS when updating
the number to contact.

SPECIFICATIONS

Currently when an user uses composer to send an SMS, number is validated
at onchange. It leads to two issues

  * jump of content as a warning box appears;
  * visual warning displayed after user may have clicked on "Send"
    button, leading to warning not being useful;

We choose to validate number in real time in order to give directly
a feedback to the user. It also lessens flickering on composer screen.
This is done by allowing to trigger the 'change' event on key down. This
requires a specific onchange_on_keydown option to be used on char field.

LINKS

Task ID 2229050
PR #51159

closes odoo/odoo#52962

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-15 13:26:13 +00:00
Aaron Bohy 26fe23201b [IMP] web,*: properly define env in the frontend
*bus,mail

This commit extracts the common basis of the env to use both in
the frontend and the backend. The public env now contains most of
the features that were previously (only) in the webclient env.

Moreover, the PublicRoot no longer uses the ServiceProviderMixin,
such that services are only deployed once, in the (public) env.

Owl components can now be defined in the website, and rely on a
properly built env. Legacy widgets still works as they access
services through the PublicRoot (via trigger_up) which redirects
those requests to the env.
2020-06-12 08:04:14 +00:00
Julien Mougenot c4786fccfd [IMP] *: update notifications to optional title
closes odoo/odoo#52826

Related: odoo/enterprise#11084
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-12 09:01:50 +00:00
Jorge Pinna Puissant 07a3d7f31e [FIX] mail: pdfjs viewer download name
Before this commit, when downloading a pdf from the pdfjs viewer, the
name of the pdf was always 'document.pdf'.

Now, the correct name of the pdf is used when downloading the file.

opw-2269841

closes odoo/odoo#52878

X-original-commit: b9cd32a7f19b8f73385dea534ad3cc5b126bc6dd
Related: odoo/enterprise#11109
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-06-12 06:48:05 +00:00
Pierre Collinet (pic) f1c99a60fa [IMP] crm: improve onboarding tour of module CRM
Add an autocomplete for opportunity name. If no name is set when a customer is
selected set the name partner_id.name's Opportunity

Change help title and subtitle to be more explicit. Change title from "Create
an opportunity in your pipeline" to "Create opportunities to keep an eye on
all your ongoing sales talks." Concerning subtitle, if a valid
and active email alias is found : Emails sent to ALIAS@address automatically
create opportunities.

Improve crm onboarding tour text messages and display.

Change menuitem from Teams to Team Pipelines to be more explicit. Update
the corresponding act_window name in the sales_team module.

Make the "schedule an activity" button bigger (100% of the div) and highlight
the entire Schedule button box.

Update test tours accordingly. Since quick create opportunity form is updated
the tests were failing. Reason is a trigger on input:first trying to detect
the field "name". This is not the case after this commit's changes.

Task ID 2226563
Community PR #51587
2020-06-11 12:26:45 +00:00
Sébastien Theys 87f49b0616 [REM] im_support: remove im_support module
The goal of the module was to communicate with livechat operators on our
production server, except the feature is disabled on our prod and we don't plan
to reactivate it any time soon.

closes odoo/odoo#52691

Related: odoo/upgrade#1313
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-06-09 10:58:52 +00:00
jvm-odoo 329b6c2409 [FIX] mail: fix redirect to mention in ThreadWindow
Issue

	- Install Contacts
	- In systray, open #general
	- Mention anyone (except your user)
	- Send
	- Click on the mention

	It does nothing

Cause

	In thread_window _onRedirect, we pass
	the _open method bounded to this.

	But this = the #general thread window
	so it will open the general thread again.

	As it is already open, it does nothing

Solution

	Modify the open method in order to
	receive the returned channelID and
	pass it to the call

OPW-2265580

closes odoo/odoo#52834

X-original-commit: 5957aa317e8bb5b0041a1b5d8256cb3ff7d9fe42
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-06-11 10:25:15 +00:00
Hiral Bhavsar d46610ccb2 [IMP] mail: few improvements on activity widget
PURPOSE

Display the activity type through the icon of the widget and change the place to
display to whom the activity is assigned (if it is not assigned to the current
user).

SPECIFICATION

Display the deadline with a prefix as responsible if the activity assigned to
another user than the current one (uid).
Add a new 'activity_type_icon' field to the mail mixin to get the 'icon' of the
type (fa-phone, fa-users, etc...) and for the list_activity widget, display it
as an icon instead of the default 'fa-clock-o' icon.

LINKS

PR https://github.com/odoo/odoo/pull/52252
Task-2267579

closes odoo/odoo#52252

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-10 05:23:34 +00:00
jvm-odoo 6ac5b14d52 [FIX] mail: fix mark several messages as read
Issue

	- Install Discuss & any app with a chatter
	- Have 2 session, admin & demo
	- Clear admin systray messages

	As demo:
		- Discuss > #general
		- Ping (@...) admin 2 times

	As admin:
		- Go in the app you installed
		- Open systray messages
		- Mark messages as read

	It doesn't work

Cause

	When marking as read we get the message-ids as a string
	and if you have several ids it will be ["1,2"] which is
	not supported by the back-end

Solution

	The back-end should receive an array like [1, 2]

OPW-2234671

closes odoo/odoo#52608

X-original-commit: fbe91697fb1bc2ade5eba034b97bd671eeaf200b
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-06-08 13:44:26 +00:00
xO-Tx 569d35bc2d [FIX] mail: fix emoji menu position/overflow issues (on mobile screen) and emojis display (for different OSes > browsers)
This commit attempts to fix the emoji widget position issue (only in enterprise versions) on mobile screen.
The emoji dropdown overflow & emojis font display issues (on mobile screen) are also fixed in this commit.

The following changes have been made :

1- Add css media-breakpoint to override widget position in small breakpoint and narrower.
2- Add position-relative + bottom css on widgets to avoid negative margins.
3- Set a max-width for the dropdown on mobile screen.
4- Add width/height on emoji icons to solve emojis position issue for some fonts (on different OSes > browsers).

This fix was made with the 'smallest possible changes' taking in consideration effects on :

- "text_emojis" widgets, since they use same class : "o_mail_emojis_dropdown".
- Emoji widget position in community (This fix won't break widget position in community version).

Task ID 2224393

closes odoo/odoo#52182

X-original-commit: 405e113e897b914eed41b34a66b5a7f740dcd336
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-29 14:11:18 +00:00
Anh Thao Pham (pta) 71fb04ea3c [FIX] mail: fix error when clicking on follower icon in chatter
- Go to any page where there is a chatter
- Click on the followers list icon to display all followers
- Click on the icon (not the name) of a follower
This generates an error.

The redirect is executed in JS by retrieving the model and the id added to the <a> element.
When clicking on the follower icon, we are not clicking on the <a> element but on a child.
The model and the id have to be retrieved from its parent element.

opw-2256795

closes odoo/odoo#51790

X-original-commit: 11c4a2907e635662216ebc0e745f0ce9d16771cb
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-05-25 10:37:37 +00:00
Lucas Lefèvre ef793cb5b2 [FIX] mail: Load record form view with user id
fixes #45425

closes odoo/odoo#51717

X-original-commit: a210d68af04490c0daa535e3151ed5edbd431898
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-05-22 15:15:21 +00:00
Romeo Fragomeli 15eaba09a7 [FIX] mail: avoid scrolling "NavBar" when dropdown open
Before this commit, when a SysTray dropdown is open the user can scroll
the element behind the dropdown.

After this commit, we disable the scroll until we close the dropdown.

Steps to reproduce:
* Open Odoo on "Mobile"
* Open the Activity SysTray
* Scroll the "NavBar" menu (=> Bug)

Note this fix is also applied in Desktop, as for me the "NavBar"
shouldn't never scroll on Desktop.

Task ID: 2231956
Task ID: 2234042

closes odoo/odoo#51716

X-original-commit: 7bb155991b9daec37edf73ef90cbad26268d76bb
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
2020-05-22 15:15:01 +00:00
Hiral Bhavsar 9f3a12b9f0 [IMP] mail: display user avatar in chat-box header
PURPOSE

We are currently working toward turning every user avatar (i.e. the round
picture of the user) in a shortcut to open the chatbox to that user. It only
makes sense to also have the user avatar in the header of the chatbox
(like in Facebook)

SPECIFICATION

Replace the current IM status colored dot of the chatbox header by the same
avatar/im_status compound currently used in the chatter.

LINKS

Closes https://github.com/odoo/odoo/pull/51258
Task-2256061

closes odoo/odoo#51258

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-05-20 10:55:05 +00:00
Priyanka Kakadiya 63987cfea2 [IMP] mail: display activity summary in dropdown
PURPOSE

Currently, the activity dropdown displays the activity types of activities.
The goal is to display the activity summaries instead, and fallback on the
activity type if there is no summary set.

SPECIFICATION

In the activity dropdown, display the activity summary instead of the activity
type. Only display the activity type if there is no summary set on the activity.
A long summary will be ended with a ellipsis.

Here, handled a long summary for chatter, list, kanban, and activity views.

LINKS

Task: 2254893
PR https://github.com/odoo/odoo/pull/51438

closes odoo/odoo#51438

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-05-19 07:20:31 +00:00
Nicolas Lempereur 1bb4cf7530 [FIX] mail: do not eat all document.body.drop event
In fb051d3420 there was some changes on drag and drop of chatter
windows, but this would break the drag and drop of summernote because it
wait for document.drop event for hiding the drop zone.

opw-2259522
closes #51448

closes odoo/odoo#51478

X-original-commit: 4aaf5b1f562f4cd30e05b020741eb936f6e20a20
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-05-18 15:22:01 +00:00
jvm-odoo 1159dcadbf [FIX] mail: fix "open_attachments" option's attachments not loaded
Issue

	- Install Recruitment
	- Go on any application
	- Add an attachment
	- Go back, refresh
	- Returns on the application

	The attachment box is open but
	the attachments are not loaded.

	You must toggle it again to load them.

Cause

	When opening the box, this.attachments is empty
	so no attachments are shown.

Solution

	Load the attachments if the option is present.
	It will not cause supplementary RPCs thanks
	to "_areAttachmentsLoaded"

OPW-2246116

closes odoo/odoo#50825

X-original-commit: 40cea06301505f0f931b5cfce1da0f05760f8dcc
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-05-07 09:33:52 +00:00
Aaron Bohy 841721ead9 [IMP] mail: add ListActivity widget
This commit adds a tweaked version of the kanban_activity widget
for the list view. This widget displays the summary of the next
activity (and fallbacks on the activity type if there is no
summary). It can be set by defining widget='list_activity' on
field activity_ids.

Part of task 2195254
2020-05-05 10:05:12 +00:00
Aaron Bohy c54007f0e3 [REF] mail: lint activity.js 2020-05-05 10:05:12 +00:00
Aaron Bohy 59641325c7 [IMP] mail: add Many2OneAvatarUser field widget
This widget is an extension of Many2OneAvatar, designed for
many2one fields pointing to the 'res.users' model, or a model having
itself a many2one field pointing to 'res.partner'.

With this widget, when the avatar is clicked, we open a DM chat
window with the corresponding partner. If the user clicked on itself,
we open a blank chat window for the sake of consistency.

In kanban views, this widget only displays the avatar.

Part of task 2195254
2020-05-05 10:05:12 +00:00
Aaron Bohy e63ffeab5a [REF] mail,hr: move openDMChatWindow to MailManager
It will be used by the Many2OneAvatarUser widget defined in the
next commit.
2020-05-05 10:05:12 +00:00
Sébastien Mottet (oms) debeec1201 [IMP] mail, crm: add view types for crm.lead model when coming from activity menu
Purpose of this commit is to allow customization of view types available when
using the activity menu. By default only kanban, list and form are available
as before.

Calendar, pivot, graph and activity have been added for leads, allowing
better user experience in their use of activities.

Task ID: 2228451
Community PR odoo/odoo#50042
Enterprise PR odoo/enterprise#10145

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-30 11:34:36 +00:00
Sébastien Theys dea52493b8 [IMP] mail, sms, snailmail, test_mail_full: adapt mail.notification
The purpose is to have more common code for failure and notifications, with less
override in `sms` and `snailmail`.

task-2176017

closes odoo/odoo#44170

Related: odoo/enterprise#9140
Related: odoo/upgrade#918
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-04-17 12:17:57 +00:00
Thanh Dodeur bf97152ce9 [REF] mail: removes signature from route params
This commit removes the unnecessary usage of `signature` instead of
`unique` in the route params for `web/image`.

closes odoo/odoo#48437

Related: odoo/enterprise#9501
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-04-17 11:09:41 +00:00
Michael Mattiello (mcm) f0aa343fe2 [REF] web,mail: use patchMixin and patch instead of utils.patch
This commit replaces the use of utils.patch by the new class patcher and
makes the renderers that are converted to owl patchable.

closes odoo/odoo#47700

Related: odoo/enterprise#9551
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2020-04-16 07:19:55 +00:00
Luis González 5dda9a709e [FIX] web,mail: Harmful or incomplete aria-label attributes
Some elements contain superfluous `aria-label` attributes, which
overrides any default useful information. For instance, some dropdown
menus contain the `aria-label` "Dropdown menu" (e.g. the company
switcher), which doesn't add any useful information, as dropdown menus
are already labelled correctly using `aria-expanded`.

This change applies on the following buttons:
- Schedule an activity
- View attachments
- View followers
- Switch company
- Open user options from systray
- The widget `state_selection`

closes odoo/odoo#48317

X-original-commit: e3c7f66e89d7be39dfa4cc3d6b038c6f4a114aa5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-03-25 12:39:02 +00:00
Pierre Paridans eb724d9add [FIX] mail: correctly parse datetime returned from server
When a user is Out-of-Office, the return date is displayed as "Invalid
date" on Safari (both iOS & macOS).

The parsing of the date returned by the server was done using the Date
constructor and passing the string as-is. This constructor delegates the
parsing to the `Date.parse` method. But the DateTime format used to
stringify dates in Odoo doesn't fully follow the ISO 8601, as required
by `Date.parse()`:

expected format: "YYYY-MM-DDTHH:mm:ss.sssZ"
actual format: "YYYY-MM-DD HH:mm:ss"

Also, Safari applies more strictly to this requirement than Chrome &
Firefox, resulting in a parsing error in the former browser.

This commit fixes it by using the utility function `str_to_datetime`
from `web.time` to correctly parse this date, independently of the
browser used.

NB: as this issue is browser dependent, no test has been added.

References:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
https://tc39.es/ecma262/#sec-date-time-string-format

Task ID: 2198486

closes odoo/odoo#47987

X-original-commit: b85a44aea9617b9018dd80d5f8159354bbc88f09
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-03-19 09:38:07 +00:00
Julien Mougenot c9ce8a07e1 [REF] mail: update discuss helpers
Update the 'createDisuss' helper to be appended to the DOM using 'dom.prepend' to
benefit of its 'on_(attach|detach)_callback' calls. This allows the mail test suite
environment to be closer to the actual action behaviour (having those methods called
each time it is created/destroyed).

Some tests in which these methods were manually called have been adapted.

Also, one of the tests was destroying the action too quickly and exposed an issue
within the Discuss action, in the 'on_detach_callback' method. It has thus been
fixed as well.
2020-03-18 14:51:35 +00:00
Julien MougenotandMathieu Duckerts-Antoine e68d3bb09d [REF] *: Adapt all modules to new control panel
Adaptation of the code throughout all modules to properly instantiate the newly
refactored control panel and update it accordingly.

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-13 14:08:33 +00:00
Andrea Grazioso (agr-odoo) e47ba38456 [FIX] mail: do not escape feedback before sending to backend
Open every model with the chatter
Schedule an activity
Click on "Done" button and insert a feedback with an accent/quote.

Escaped sequence will appear as result.
In v13 the html feedback field which was used to store feedback
was replaced by the mail subsystem, so the value should be sent to the
message_post_with_view unescaped

opw-2209081

closes odoo/odoo#46985

X-original-commit: d66c676e6a49cbf4cfcdae014c3b5e80dd7920d2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-05 13:50:46 +00:00
Sébastien Theys 5b87b5879c [FIX] mail: prevent hidden chat window close from opening home menu
opw-2210274

closes odoo/odoo#47245

X-original-commit: ca695425a2b06ffba15d7063fb0b8ea994f751d6
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-03-10 08:33:02 +00:00
Hiral Bhavsar 0712c5222c [FIX] mail: allow to switch on form view
Currently, when clicking on the systray activity action icon and click on any
record from the activity, kanban or list view, not redirecting to its form view.

This commit adds the form view for that action and now click on record will
redirect to its form view.

task-2198480
Closes https://github.com/odoo/odoo/pull/46877

closes odoo/odoo#47208

X-original-commit: 3fd30316c0af9a6ca2ea4962f2e2f832e68dee54
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-03-09 14:03:25 +00:00
Pierre Paridans a5dccc1586 [REV] mail: Move the attachment icon on the left
This revert of commit odoo/odoo@9cd3bcd440 is due to
the attachment's button needing to be kept on the right side of the
chatter's topbar.

Task ID: 2193950

closes odoo/odoo#46958

X-original-commit: d458aca28c25879ca9878b0628f2a6ea703504ef
Related: odoo/enterprise#9027
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-03-05 11:40:01 +00:00
Pierre Paridans 80c00af329 [FIX] mail: overflow in the attachment box
The chatter's attachment box has an horizontal overflow when adding at
least 1 attachment.

This is due to a negative margin applied on the attachment list/previews
not matching its container's padding (3px vs 5px).

This commit reuses the SCSS variable dedicated to this margin around the
attachment list/previews and apply it correctly to the chatter's
attachment box.

Task ID: 2194025

X-original-commit: 3a7eb3fe97541855ae893514f8b98cbfe6c1a7e4
2020-03-05 11:40:01 +00:00
Pierre Paridans 5d88e164bc [FIX] mail: chatter has horizontal scroll on medium screen sizes
A horizontal scroll appears on medium to large screen sizes in the
form's chatter sidebar (e.g. between 1534px and 1619px, when all modules
are installed).

This commit restores the padding set by Bootstrap for `.nav-link`
elements instead of a fraction of the grid gutter's (?) width then
applying slightly smaller padding.

Task ID: 2193950

X-original-commit: 7bc8b577d822b057d1bccf881b9c4b1ee127a728
2020-03-05 11:39:59 +00:00
Romain Estievenart 806cb4aa43 [FIX] mail: preview image distorted on mobile
This commit fix the o_mail_preview_image css by applying the same
rules as desktop.

Task ID: 2200099

closes odoo/odoo#46328

X-original-commit: f4a106c7fa5ba21bba2811d5c51cbf5bf57f4dc9
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-02-26 11:18:00 +00:00
Alexandre Kühn 86fd7ab4f0 [FIX] mail: improve discuss new channel handling in mobile
Revision on https://github.com/odoo/odoo/commit/8e5b6ab02aa95c204ea7bd241e6b8944d5972d43

Intent of commit above was to remove server-side synchronization of
chat windows in mobile. To do so, it prevented sending RPCs for chat
window state in mobile, in addition to not automatically adapt state
of chat windows in mobile from longpolling notification.

This implementation, while functionally working as intended, had
disturbing intermediate logic that could potentially lead to bugs
in the future. Specifically, on mobile, new channel did not directly
trigger a re-render of discuss widgets. However, and thankfully, the
related new message was triggering the rendering, so that UI
correctly has channel and its notification.

This commit simply improves code so that new channel always triggers
a rendering, even in mobile, like before the commit above. Of course,
to preserve the intent of not synchronizing chat windows in mobile,
new detached channels must still not auto-open a chat window, and
this commit clarifies this intended behaviour in the code.

X-original-commit: 1046d063ca46aacb1e186599b5d4a02ef9c8e18d
2020-02-25 14:50:21 +00:00
Romeo Fragomeli 7e47742225 [FIX] mail: fix scroll in discuss on small screens
When using the Discuss app (not the systray's thread window) on a small
device, it is not possible to scroll through the discussion (cf. tab
"Chat" or "Channels").

Steps to reproduce:
* Go in discuss (in mobile)
* Go to tab chat or channel => BUG
NB: you must have enough element to test the scroll

This bug is due to the commit odoo/odoo@3ad7706560.

Before it, the styles as interpreted by the browser looked like this:

    .o_mail_discuss_tab_pane {
        overflow-x:scroll; // explicitly set in discuss.scss
        overflow-y:auto;   // implicit ; due to the overflow-x rule
    }

But by removing the overflow-x rule, the styles ware interpreted as:

    .o_mail_discuss_tab_pane {
        overflow-x:visible;   // implicit ; due to the absence of overflow-* rule
        overflow-y:visible;   // implicit ; due to the absence of overflow-* rule
    }

In addition, the parent element had an overflow: auto rule scoped only
for desktop-like screens.

This commit fixes this issue by unscoping the overflow: auto rule on the
parent, allowing to scroll the messages' list in both desktop-like and
mobile-like screens.

Reference:
https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-x

closes odoo/odoo#45964

X-original-commit: f4b22af7ed28d3515d77bfd76691aba1129581b1
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-02-21 15:20:18 +00:00
Romeo Fragomeli 49c46b0bb4 [FIX] mail: activity popup is outside the screen
Before this commit, the popup activity in kanban was rendered using
the position of the button. So the left popup was nearly in the center
of the screen but the width is too large to be contained on the screen.

After this commit, in mobile, the popup activity in kanban will be
placed on the left of the button to avoid to go outside of the viewport.

Steps to reproduce:
* Go to sale app (in mobile)
* Click on the activity button of a kanban card (clock icon) BUG

Task ID: 2198429

closes odoo/odoo#45860

X-original-commit: 392c8a57df798d92b8be73d743b690891cf2fda2
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-02-20 16:56:13 +00:00