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
- restore "solid" icon
- restore muted style when no notification
- opportunity is taken to fix off-pixel of activity menu
task-2278416
closesodoo/odoo#53094
X-original-commit: 1164b37c5fb33d124ede52356c613b7cd31ac8e1
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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.
closesodoo/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>
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 #51159closesodoo/odoo#52962
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
*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.
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
closesodoo/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>
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
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.
closesodoo/odoo#52691
Related: odoo/upgrade#1313
Signed-off-by: Christophe Simonis <chs@odoo.com>
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
closesodoo/odoo#52834
X-original-commit: 5957aa317e8bb5b0041a1b5d8256cb3ff7d9fe42
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
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
closesodoo/odoo#52252
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/odoo#52608
X-original-commit: fbe91697fb1bc2ade5eba034b97bd671eeaf200b
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
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
closesodoo/odoo#52182
X-original-commit: 405e113e897b914eed41b34a66b5a7f740dcd336
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- 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
closesodoo/odoo#51790
X-original-commit: 11c4a2907e635662216ebc0e745f0ce9d16771cb
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#51258
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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/51438closesodoo/odoo#51438
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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#51448closesodoo/odoo#51478
X-original-commit: 4aaf5b1f562f4cd30e05b020741eb936f6e20a20
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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
closesodoo/odoo#50825
X-original-commit: 40cea06301505f0f931b5cfce1da0f05760f8dcc
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
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
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
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>
The purpose is to have more common code for failure and notifications, with less
override in `sms` and `snailmail`.
task-2176017
closesodoo/odoo#44170
Related: odoo/enterprise#9140
Related: odoo/upgrade#918
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit removes the unnecessary usage of `signature` instead of
`unique` in the route params for `web/image`.
closesodoo/odoo#48437
Related: odoo/enterprise#9501
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit replaces the use of utils.patch by the new class patcher and
makes the renderers that are converted to owl patchable.
closesodoo/odoo#47700
Related: odoo/enterprise#9551
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
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`
closesodoo/odoo#48317
X-original-commit: e3c7f66e89d7be39dfa4cc3d6b038c6f4a114aa5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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/Datehttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parsehttps://tc39.es/ecma262/#sec-date-time-string-format
Task ID: 2198486
closesodoo/odoo#47987
X-original-commit: b85a44aea9617b9018dd80d5f8159354bbc88f09
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
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.
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>
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
closesodoo/odoo#46985
X-original-commit: d66c676e6a49cbf4cfcdae014c3b5e80dd7920d2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
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/46877closesodoo/odoo#47208
X-original-commit: 3fd30316c0af9a6ca2ea4962f2e2f832e68dee54
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
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
This commit fix the o_mail_preview_image css by applying the same
rules as desktop.
Task ID: 2200099
closesodoo/odoo#46328
X-original-commit: f4a106c7fa5ba21bba2811d5c51cbf5bf57f4dc9
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
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
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-xclosesodoo/odoo#45964
X-original-commit: f4b22af7ed28d3515d77bfd76691aba1129581b1
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
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
closesodoo/odoo#45860
X-original-commit: 392c8a57df798d92b8be73d743b690891cf2fda2
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>