If the check for messaging happens after switching from channel to starred
(where there is no composer) it would crash when using `this`.
closesodoo/odoo#104392
X-original-commit: d3091762cc5769ed13b5a828769bcd03f440a8f8
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Opening a DM chat with someone for the first time automatically pins
that chat for correspondents (i.e. the chat appears in Discuss), even if
no message has been sent yet. This can be unsettling for the person who
didn't create the chat but finds themselves with an unsolicited chat
pinned with no message.
This commit solves the problem by explicitly writing is_pinned to False
for the member that is not the current user.
Task-3028156.
closesodoo/odoo#104243
X-original-commit: 395bbc0ab2c2fc2eaee9d2bbe42b507fc84ee83a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Unlinking a model during uninstallation can potentially fail when the query
removing any related mail activity types fails. This happens when such a record
is still referenced in the mail_activity table. Explicitly removing related
mail activities (as is done for the activity types and other related mail data)
resolves the issue.
Two tests are added, one that demonstrates the general flow and a regression
test triggering the behavior that caused a bug in the uninstall procedure of
the hr_holidays module.
closesodoo/odoo#104152
X-original-commit: b315f7f562fc84a09d99d6e7676567eb6f285402
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: De Caluwé Tom (tdc) <tdc@odoo.com>
*: base_automation, lunch, mail, mrp, project, web_editor, website
This commit adds a warning if the props validation is not set for a
component.
The props validation is important to tell how a component should be
used, by looking at its code, it's a good documentation of the component.
It's also critical, to test if the component is correctly used, if all
the obligatory props are passed and that there are of the correct type.
For more information, see: https://github.com/odoo/owl/blob/master/doc/reference/props.md#props-validationclosesodoo/odoo#103723
Related: odoo/enterprise#33044
Signed-off-by: Géry Debongnie <ged@odoo.com>
This commit cleans up a bit of the emoji picker modeling, and
removes a bit of dead code
Task-2985893
closesodoo/odoo#103411
Related: odoo/enterprise#33128
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit adapts the color of `MessagingMenuTab` for dark mode.
task-2710677
X-original-commit: 2b641f3140b784c2f4c03fd3a76c8fda2e0ed79e
Part-of: odoo/odoo#103162
When creating a recipient from composer_suggested_recipient the user
is free to modify the partner form however they want.
This can lead to them inputing data which will create a partner
that does not match the suggested partner data.
In that case the box acts as if the partner was not created.
This aims to remove the partner in such cases and warn the user.
task #3016112closesodoo/odoo#104005
X-original-commit: 51dd925d3660609b03349c42377e15064461eb3e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit moves some code from components to models,
so that eventually all business code will be in the models.
[IMP] mail: Move code from components to models (DiscussMobileMailboxSelectionItem)
Task-3004221
[IMP] mail: Move code from components to models (ActivityMarkDonePopoverContent)
Task-3004282
[IMP] mail: move code to models (MessageComponent)
Task-3000365
closesodoo/odoo#104003
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when opening emoji picker for the 1st
time, content was blank for a small time.
This happens because data of emoji picker is lazy loaded
until opening of emoji picker the 1st time. The problem
is that it gives the impression that emoji picker is not
working, but it's actually loading.
This commit fixes the issue by showing a "loading..." screen
while the emoji picker is loading data.
Task-3015932
closesodoo/odoo#103957
X-original-commit: 22472cd4d2681c07371c8515bb964553b7c2b700
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, only the window resize would trigger a rerender of
the mainCallView. This commit makes sure that any resize of the
component will trigger a recomputation of the content layout.
closesodoo/odoo#103818
X-original-commit: 0d95da350898b6555a59d379b03181f688456c9d
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Currently, the rounded-pill around many2many_tags_email tags is not rendered correctly: the color and the box-shadow style attributes are not applied.
This commit fixes that by adding the o_tag class to email tags, in order to apply the o_tag.o_tag_color_0 css rule.
closesodoo/odoo#103770
X-original-commit: 2a61a3c17c933c712c05a10359ee0d8bffa1dccc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Some of our current bus notification only insert data in the models system. We
can now simplify the way we handle them by using a generic `mail.record/insert`
handler.
closesodoo/odoo#102863
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The emoji search bar should not be automatically focused when using odoo
on mobile.
This commit re-introduce the auto-focus of the search bar, and also
cancel auto-focus if using odoo on mobile
Task-3015386
closesodoo/odoo#103672
X-original-commit: 282a09c5d62d32a35636c9357033b8f18631b85f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit introduce a field to determine condition for
reloading chatter parent view when a file has changed.
This allow patching the field so that more conditions
could trigger a view reload.
Task-2886634
closesodoo/odoo#103660
X-original-commit: 3e097db1c92a316fb7c5de0ce6124ce5ea7e07be
Related: odoo/enterprise#33005
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Move code from components to models, so that eventually all the
business logic is in models.
The benefit of business code in models is to ease proper modelling
of whole state of the discuss features, which is highly desireable
for easily maitainable code or to implement sophisticated features
in a robust way.
[IMP] mail: move code to models (AttachmentViewer)
Task-2996277
[IMP] mail: Move code from components to models (DropZone)
Task-3004211
[IMP] mail: move code from components to models (ChatWindow)
Task-3004259
[IMP] mail: Move code from components to models (ChatWindowHiddenMenu)
Task-3014736
[IMP] mail: Move code from components to models (ChatWindowHiddenMenuItem)
Task-3004253
[IMP] mail: pass only record as props (ChatWindowHeader)
Task-3001202
[IMP] mail: Move code from components to models (MessageList)
Task-3004204
closesodoo/odoo#103591
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when a recipient is suggested in composer header
and current user click on checkbox, there was the following warning
in the console:
```
read-only SuggestedRecipientInfo/isSelected on record(SuggestedRecipientInfo_1) was updated
```
The state of a selected suggested recipient is determined by being
manually selected on UI, but also that there's a partner related
to this recipient. `isSelected` is a computed field with itself
as dependency, and it was also imperatively set. We don't want
any computed field to be set imperatively, hence the warning in
the console.
This commit fixes the issue by introducing another field that
is specific to selection on UI by current user. This field does
not depend on whether there's a partner. This field is imperatively
set, and then `isSelected` is fully declarative as a computed field
with no self dependency and no imperative update.
Task-3032869
closesodoo/odoo#103573
X-original-commit: 8e2980e1e871a8046f09d3d0affb6400ee030eeb
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
WebClientViewAttachmentViewContainer was missing in the FormRenderer components
This prevented opening account.payment lines from the Batch Content tab of Batch Payments
closesodoo/odoo#103450
X-original-commit: 2d58c5bf8679cffd4d0ad33782f47962b72cc3cd
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The toggle star action view currently does not take into account the
starred state of the message, returning "Mark as Todo" unconditionally
as a title for the button.
This commit adds a check for the starred state to return an appropriate
title if the message is already starred.
closesodoo/odoo#103432
X-original-commit: b77660850bb0dbf4fad2a52d931e230f4acde975
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
When having falsy values, we may end up with 'False' as a string. Better be
defensive when trying to parse res_id.
Task-3025143
closesodoo/odoo#102576closesodoo/odoo#103378
X-original-commit: ac8d97262d196c7bb4c4fc15db63cc66512be838
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
These are deprecated since Owl 2, and lead to memory leak in the
compatibility layer. This PR removes the last ones in the mail code.
task-2877316
closesodoo/odoo#103301
Related: odoo/enterprise#32842
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the active category was wrongly computed,
which results is wrong display of the active category while
scrolling and while clicking on the category bar.
The bug was that computation relied on condition of 1st rendered row,
instead of 1st visible row. Rendered rows include the extra before
the 1st visible one, here 10 extra rows above.
As a result, the computation of active category acts as if the
viewport was offset by 10 rows upward.
Task-3017324
closesodoo/odoo#103124
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
On the emoji picker, additional rendered rows on top and bottom
were not loaded correctly on top.
This commit fixes the top rendered rows not working properly.
Also fixes computation of some fields that should contain
integer values (index) but had float instead, which required
late rounding.
Task-3000424
X-original-commit: 24d9b970d032709b8f80cf49da057156ccd7fde5
Part-of: odoo/odoo#103124
Prior of this commit records without activities buttons were rendered
with a double border (eg. CRM > Sales Teams > Team's formView).
This commit will adapt the layout accordingly avoiding to render a
border when it's not necessary.
closesodoo/odoo#103145
X-original-commit: 1903f7aa2553b555b58df066f584feb4caf25e71
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the callViewer could end up too small and only have
space for the callActionList, which was hiding call participants.
taskid-3014640
closesodoo/odoo#103144
X-original-commit: b9370f5fdf0dcbcf23280f370408eab5183433e6
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, trying recover a connection that didn't exist
anymore would cause a traceback. This commit fixes this issue.
closesodoo/odoo#103088
X-original-commit: 44973577e4bfc7b36b5d3aa356519a36fb6ecc78
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This PR improves the style of the kanabn actiivty popover after the wowl
refactoring. It focuses on:
- Restoring button hover style
- Restoring scroll behavior for multiple activities
- Restoring text ellipsis on long activity summary/name
- Centering mark done buttons
task-2998139
closesodoo/odoo#102983
X-original-commit: 2cebfd9
Related: odoo/enterprise#32667
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, when clicking on category in category bar,
the search bar was (re-)focused.
It was flickering, especially when device prompt a soft keyboard,
such as on mobile.
This commit fixes the issue by not (re-)focusing the search bar
when clicking on a category from the category bar.
Task-3013819
closesodoo/odoo#102987
X-original-commit: 61790c029b3b78c2a099ec72b0d688c28d803374
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, when clicking on a mail failure in
the messaging menu in mobile, it crashed.
`NotificationGroupView` is already destroyed, so it crashed
due to attempting to access a field (`messaging`)
Task-3013202
closesodoo/odoo#102986
X-original-commit: 73b94715f0d0086d361937491c27c611a03a9f67
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Instead of having a dedicated module for all-things dark mode related,
this commit moves the (S)CSS files into their respecting modules and
uses `web` and `web_enterprise` to provide the base infrastructure for
the dark mode (cf. dedicated assets bundle).
Note:
Don't forget that you have to handle 2 cases:
1: SCSS variables must be placed BEFORE bright ones
2: CSS variables must be placed AFTER
task-2710677
Part-of: odoo/odoo#102868
Prior to this commit, the border of any badge was set to "1px
$o-brand-primary" in order to achieve the default badge design that
comes with transparent background.
Unfortunately this rule was affecting colored badges too, leaving no
choice rather then either remove the border (causing misalignment with
siblings default badges) or hide/re-color/keep the undesired decoration
, but with mixed results.
These commit will review the behavior applying an outline (that doesn't
affect badge's placement) to "default badges" only.
Commit preparatory to the introduction of dark-mode.
task-2710677
Part-of: odoo/odoo#102868
Since the view's background-color has been historically white, the
`bg-white` class has been used to make match several UI components.
Despite working for the default color-scheme, this approach leads to
inconsistencies when the default view's background-color changes, eg.
dark-mode.
This commit introduce 'bg-view' to set any element to match the view's
background-color, whatever it is.
Commit preparatory to the introduction of dark-mode.
task-2710677
Part-of: odoo/odoo#102868
BUE
Steps to reproduce
- go to Apps, switch to studio and create and create a new app.
- on the form view, add a Many2one field related to 'Sales Order'.
- add a Ralated Field, related to 'Sales Order > Total'. You will be
presented with a prompt informing you that you need a currency field
on the model. Click 'OK' to add the currency field.
- again, add a Ralated Field, related to 'Sales Order > Total'.
- close Studio, fill the form you just created and save.
- switch back to studio and, again, add a Ralated Field, related to
'Sales Order > Total'.
You will be met with a traceback.
FIX
Actually defining a currency field on currency fields is mandatory. We
don't have to provide a fallback, hence we don't have to fix the fallback.
Simply remove it.
Task-3012648
opw-2951697
Closesodoo/odoo#94831Closesodoo/odoo#94962closesodoo/odoo#102918
X-original-commit: 899f3b4897f34576d502cf442ab7059c489870dd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The field was not correctly aligned because the invisible rule was not
the same on the field and the sibling's DIV. So in some case, we can
have an empty DIV present with no label (e.g. when `is_log = false` and
`composition_mode = mass_mail`).
Note that now with grid, we need two filled columns otherwise we will
have a shift for the next following labels/fields, because grid will try
to fill the empty space.
Steps to reproduce:
* Open Helpdesk
* Select a Team
* Select the list view
* Check a row (line)
* Click on "Action" menu
* Click on "Send Email" => BUG
closesodoo/odoo#102941
X-original-commit: 52c8a8f4c16fe5765d64265f718164162f1cf172
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Form view has multiple containers that are exclusive, before this commit
switching from one container to the other would lose all current chatter state.
closesodoo/odoo#102934
X-original-commit: a3d151d0c9c84c2dcffc28a342c40f38d0b28370
Related: odoo/enterprise#32644
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: mail, website_livechat
This commit adds new option in Livechat Button visibility
"Show with notifcation", which allow to see livechat button
and also display a customizable floating text next to button.
This text appears 1 second after the livechat button become visible.
Task-2937993
closesodoo/odoo#102930
X-original-commit: 785356f46b49d1b3d9b975319c87f39266694b82
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>