Before this commit, when the user creates a private task
and assign another user to that task and then removes
himself and save the task, the current user should no
longer access to that task since the task becomes this
private task of the other user assigned on it.
So when the current user changes anything in that task,
it will have a `Access Error`.
However if the user tries to remove a follower on that
task he will also have a traceback because no thread is found.
The reason why no thread is found is because the user has
no longer access to the record and so he has no longer
access to the chatter.
This commit checks if a thread is found before continuing
the process. If no thread is found then the user has no
access to the chatter instead of throwing a traceback
because no thread is found.
task-2857229
closesodoo/odoo#94665
X-original-commit: 2c68e397b3c12657024e70016808183c89260168
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Co-authored-by: Prakash Prajapati <ppr@odoo.com>
Setup was conditionally done in render lifecycle methods, but it could be moved
to init instead, allowing to simplify the code and remove unnecessary methods
and overrides.
Part of task-2871070
closesodoo/odoo#94307
Related: odoo/enterprise#28893
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Emails could not be resent from the chatter after failing to be sent.
This was due to parts of code not being updated after a refactoring of OWL.
Multiple other instances of non-updated code are updated here.
Task-2887153
closesodoo/odoo#94529
X-original-commit: 8fbdb1b52b9051e92e4980d5af73460a46fe70da
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit introduces a node option 'keydown_debounce_delay' on the
character field and on emoji mixin, so that use can define the custom
debounce delay (in milliseconds) instead of fixed 2000 ms for
triggering an onchange on the field. Note that this delay will be
applied only when 'onchange_on_keydown' node option is also provided.
Also, we've utilized the odoo's debounce instead of the one provided by
underscore js, for 2 reasons:
1 - odoo's debounce is already well tested (see the file
/web/static/tests/core/utils/timing_tests.js)
2 - to take a step forward for reducing external lib dependency
task-2821978
closesodoo/odoo#94486
X-original-commit: ab80cdc0809e1347d201f21ac9474e66e9270f94
Related: odoo/enterprise#28822
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
revert of https://github.com/odoo/odoo/pull/91209
Steps:
- Go to CRM, kanban view
- click on "Planned" button
- click on "Mark as done" button
- click on "Write Feedback" textarea
The activity dropdown disappears immediatly
opw-2884875
closesodoo/odoo#94470
X-original-commit: f59dab2ed666d5a71eb84d53c50bcdd15e264d96
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
This commit duplicates the components Emoji and EmojiList into
other components called "LegacyEmoji" "LegacyEmojiList".
We do this so that we can implement the new EmojiPicker in Discuss
code, without affecting the code of `knowledge` during development.
When the Emoji Picker is in a good state with just the scope of
feature of Discuss, then we can integrate this new Emoji Picker
in other modules, like `knowledge`.
Task-2890268
closesodoo/odoo#94254
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The call in `_renderNode` is too early and appears to do nothing. It has been
moved to `_updateView` (coming from enterprise).
Part of task-2871070
closesodoo/odoo#94188
Related: odoo/enterprise#28691
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Now that the method no longer requires an override in enterprise, it doesn't
need to exist as a separate method.
Part of task-2871070
Part-of: odoo/odoo#94188
This commit moves the `CallActionList` of the `CallView` so that it sits
below the main card view but not below the sideBar.
part of task-2692836
Part-of: odoo/odoo#94035
Overridden methods from Form view are separated from custom mail methods, and
are sorted according to their call in the lifecycle.
This will make it easier to understand the file, in preparation to clean it
further.
Part of task-2871070
closesodoo/odoo#94140
Related: odoo/enterprise#28655
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this fix, follower subtypes were displayed by order of id,
whereas in DiscussController.read_subscription_data(),
it was ordered by :
\- parent_mode
\- res_mode
\- internal
\- sequence
See : https://github.com/odoo/odoo/blob/fc115ebdf7c3783f9eaabba71eccce23c676d957/addons/mail/controllers/discuss.py#L471-472
In this commit, we just reproduce the same order.
Also, for `parentModel` and `resModel`, we want the record
with their values unset to come first.
We added 'undefined-first',
as this sort order might be needed for other models.
closesodoo/odoo#93315
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Now that it potentially contains guests, the previous name is no longer correct.
Part of task-2883466
closesodoo/odoo#93731
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
And use it on partner im status.
This will allow displaying the im status of guest without any other change to
components.
Part of task-2883466
Part-of: odoo/odoo#93731
* = im_livechat, test_discuss_full
Various improvements to user settings, including:
+ Introduce new js models `res.users.settings` and `res.users.settings.volumes`
to mirror the python models.
+ Avoid reformatting server data and simplify the way notifications are handled.
+ Clean dead code (unused convertData).
+ Reword and add documentation.
closesodoo/odoo#93390
Related: odoo/enterprise#28291
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Follow-up of https://github.com/odoo/odoo/pull/93330
Commit above renamed "MediaPreview" to "CallDemoView".
However, it mistakenly did not rename the SCSS rules that
referred to `o_MediaPreview`.
As a result, some styles were no longer applied, like buttons
being an overlay on top of camera stream.
closesodoo/odoo#93724
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Current design, especially related to views in small viewports, has
been revamped in order to increase readability and to be more coherent
with the one in large screens.
Task-2813949
closesodoo/odoo#87915
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Current SCSS is replaced with global Bootstrap classes, in
order to reduce code lines and to increase performance.
Task-2813949
Part-of: odoo/odoo#87915
For the kanban_activity view (e.g.: in the CRM module), when we have enough
entries to require the scrolling, dropdowns are not displayed at the correct
location.
Furthermore, in kanban views, when dropdowns are opening on the edge of the
parent element (e.g.: in Documents), the dropdowns are partially hidden and not
accessible by the client.
Step to reproduce the issue:
1) Install CRM and Documents module
2) Go to CRM and create multiple leads with at least one activity
3) Go to the Activity view and scroll down and click on an item. The dropdown
is not placed at the correct location -> BUG 1
4) Go to the Documents modules and check the activity (the small clock icon)
of a Document on the right most column. The dropdown is hidden by the
description of the file.
Solution: Firstly, the parent container of the Kanban Activity view did not had
the `overflow: auto` property activated. Consequently, while the children were
somehow taking all the spaces of the screen, Popper (the third party that
handles the dynamic positioning of the dropdowns) was wrongly computing the
positionning.
Secondly, dynamically creating the dropdown via Javascript (through the
JQueryInterface of the Dropdown class in Bootstrap) somehow allows to fix the
issue in Documents. Consequently, it is important to keep them into the
Javascript and not move the arguments into the XML.
opw-2827873
closesodoo/odoo#93661
X-original-commit: 38fa6a70b70dac0d511be7952c496a5178f9c40e
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Desausoi Laurent (lade) <lade@odoo.com>
Before this commit, since the removal of the modelManager from the
scope of some components, the call systray menu would never show up
as messaging was never defined.
closesodoo/odoo#93616
X-original-commit: ab13e5a8649d82c985163cd82f0c43e4975afca7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Follow-up of https://github.com/odoo/odoo/pull/88950
Commit above introduced `MessageSeenIndicatorView`.
Conceptually, `MessageSeenIndicatorView/messageSeenIndicator`
is required. However, the current implementation make it
possible to have a view without the related pure logic record.
This commit simply guards the template to take this implementation
detail into account, as to not make it crash.
Note that future changes in modelling will enforce
`MessageSeenIndicatorView/messageSeenIndicator` being required, so
that we won't need to guard it in template. But this is a fix in
stable version, so it's safer to keep minimal code changes.
closesodoo/odoo#93599
X-original-commit: 495379b20c077ab27b91850673222893e0d14a8e
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
We instead use the standard owl.utils.escape.
This allows having less custom implementations of escaping and rely on existing
tools.
Task-2622893
closesodoo/odoo#81293
Related: odoo/enterprise#22850
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
After the refactor performed on 3fea5b213 to start using OWL, a lot of
aria attributes were lost.
ARIA attributes are required to ensure good compatibility with asistive
technologies and keyboard users.
This commit reintroduces such attributes, which include:
- `aria-label`: used for elements with title but no text
- `role`: mainly used for elements that behaves as buttons or links
- `aria-expanded`: used on buttons that toggle menus or content, e.g.
button to open attachments or followers
- And another ones like `aria-pressed`, `tabindex`, etc
closesodoo/odoo#93506
X-original-commit: 35442d9b4102b56421417fc03a686ff916e87bb1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit the feature to auto-reload on attachment changed only worked
through composer or attachment box, now also works with "upload file" activity.
closesodoo/odoo#93486
X-original-commit: 4ab3cb40b09f2c7278bea3bf1136b9ebf6dadc0e
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit make messaging service available in the frontend and in
the livechat external lib bundle.
This is preparation to refactoring JS livechat to use models and OWL.
*: bus, mail, survey, web, website_livechat
Task-2870899
closesodoo/odoo#92786
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>