This commit fixes the ribbons used in `kanban` and `form` views.
The SCSS uses the square root of the parent `div.ribbon` to calculate its
diagonal width and applies that width to the child `span`.
After changing the ribbon's transform-origin, we calculate the ribbon's
position based on CSS variables of the view's top padding,the height of
the ribbon and the shadow's size (to avoid it being cropped by
overflow-hidden).
By changing the values of a few of these variables in the kanban view,
we were able to remove all the specific SCSS related to ribbons in the
modules.
Other changes were applied inside some of the modules to make this
work:
- `event`: padding corrections on the kanban's cards;
- `hr_holidays: replaced `margin:0` in the SCSS with negative margin
utility classes on the element to achieve the same visual result;
- `discuss`: moved the ribbon to the parent element;
- this was also done to `discuss`, `survey` and `helpdesk`;
- `crm_team_view` in `sales_team`: the ribbon's height made it overflow
from the kanban's card. We fixed this by changing the value of one of
the CSS variables in the view's SCSS file;
- the same thing was done in `survey` and `appointment`;
- `website_event_exhibitor` had some SCSS that wasn't being used because
it uses `.o_ribbon` instead of `.ribbon`
task-2818586
Part-of: odoo/odoo#116641
This commit brings the ControlPanel into a single line with 3 main
sections:
- buttons & breadcrumb
- layout related actions (ie. the SearchBar in multirecord view or
ButtonBox in formView)
- navigation (pager, switch view...)
Add new search bar menu, this is a merge of the following components
into one big component display in column:
* comparison_menu
* favorite_menu
* filter_menu
* group_by_menu
Also adapt navigation hook.
Part-of: odoo/odoo#116641
Depending on Milk, this commit adds some missing borders.
Also adapts default `border-radius` to apply milk design.
task-2818586
Part-of: odoo/odoo#116641
- ButtonBox is moved to the ControlPanel's actions section (center).
- StatusBarField, ButtonBox and PercentPieField design.
- Chatter is moved below the ControlPanel (aka "in the view")
task-2818586
Part-of: odoo/odoo#116641
Co-authored-by: Pierre Paridans <app@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
*: account, gamification, mail, mrp, note, project, website_blog,
website_event_track.
Uniform design defining a common element shared across different
modules.
task-2818586
Part-of: odoo/odoo#116641
*: im_livechat, website_livechat.
Before this commit, the `thread.insert` method received an arbitrary
`serverData` key. This was cumbersome since we needed to create this
key manually at each insertion.Moreover some attributes where coming from
dedicated keys, some from the serverData key, some from both which led
to a bug-prone, hard to maintain code.
This commit removes the `serverData` key in order to solve those
issues.
closesodoo/odoo#121117
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: project, web
This commit adds the title and aria-label attributes to the activity
button. This makes the hover display the summary or an explaination
about the button, especially when there is no text displayed next to
the button (in Kanban view).
In the state selection field, a title has been added when hovering
the state in kanban, allowing to see the current value. The project
task state selection has also been adapted to have that title attribute
set on the toggler.
task-3207639
closesodoo/odoo#120871
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit adapts the behavior of all readonly fields
to take access rights into account when deciding whether the field
should be editable or not.
Steps to reproduce: give minimal access rights to Marc Demo user,
log in as Marc Demo, go to crm, make sure no one is assigned as
salesperson in a record and check if the add user icon is available.
Also applies to every kanban view fields (like priority,
many2many_avatar, ...)
opw-3265086
closesodoo/odoo#119818
Signed-off-by: Georis François (fge) <fge@odoo.com>
Allow users to unfollow easily document from the inbox for which he/she doesn't
want to be notified anymore.
When hovering on a follow up message with a related document followed by the
user, the interface displays an action to unfollow it that allows the user to
remove himself/herself as follower of the document. As a result of performing
that action a toast is displayed as a feedback.
Technical note:
The unfollow link is displayed on a message.canUnfollow is true which check
that the thread related to the message is followed by the user.
In order to know if the user follows the record related to the message, we now
transmit with each message the id of the follower table that link the user to
the related record if it follows it. This allows to insert the follower on
client side so that the unfollow action can use the standard mechaism already
developed to unfollow a record.
Unfortunately, that information coudn't be added in the already public method
message_format of mail message because that method is not always called on the
user retreiving the message but also by the one posting message. We didn't want
also to include all followers in the formated message so we rely on additional
method that add that information per partner.
To support unfollowing a document in the inbox no matter the current company,
we have modified message_unsubscribe in mail_thread to allow internal user to
unsubscribe themself without checking any rights. Indeed, some document have
record rule that prevents reading it if the user is not in the right company
(ex. crm.lead) and then was preventing the user to unfollow the document using
that method.
Task-3061864
Part-of: odoo/odoo#107978
*: calendar, iap_mail, im_livechat, mail.
Until now, one had to subscribe to the global "notification"
event of the bus service and to loop through each notification
to handle the one that was targeted.
This PR introduces the `subscribe` method on the bus service
in order to subscribe to a single notification type.
closesodoo/odoo#120893
Related: odoo/enterprise#40848
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This PR fixes the `Posting message should transform relevant data to emoji`
test that sometimes failed due to a race condition.
The assertion was too strict, this test just needs to check that the
emoji are properly parsed when posting a message.
Fixes runbot error: 20934.
closesodoo/odoo#120769
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, when you reply to a message or edit a message, the action would
be cancelled when you click somewhere else than in the composer or emoji picker.
This PR remove this behavior.
closesodoo/odoo#120753
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
This commit simply fixes how the activity renderer propagates the
group.progressValue prop to the ColumnProgress component so that
the active value is only set for the filtered column and not for every
column.
opw-3272571
closesodoo/odoo#120733
X-original-commit: 3bd539913e9ca6f9db9bb55caaa4a85b69a912e0
Signed-off-by: Luca Vitali <luvi@odoo.com>
Using hardcoded ORM commands in tests is cumbersome and not reliable.
This commit introduces the same system as the one used on the server.
closesodoo/odoo#120670
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when composer had some text content in
multi-line, arrow up/down was not jumping to previous/next
line.
This happens because the navigable list is active even when not
shown, and was preventing all keydown events.
This commit fixes the issue by limiting handling of keydown
events of navigable list to when it is shown.
Also fixes a bug where the quick edit of last message was triggered
when composer text was non-empty with ArrowUp. This should only
be triggered when the composer text input is empty.
closesodoo/odoo#120657
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The activity view is an aggregation view, meaning that we show all the
activies with no limit of records.
Steps to reproduce:
There is no easy way to reproduce the bug, the database should be
populated with more than 80 records in a model and have an activity
planned for the 81th record.
Current Behaviour:
The Activity view loads all the activities without limit and so the
activity for the 81th record. The problem is that the 81th record does
not have been loaded due to the default limit of the RelationaLModel.
Therefore the activity view crash because it cannot fetch the missing
record for a loaded activity.
Expected Behaviour:
The activity view laods all the activities but also loads all the
records so it can render them.
closesodoo/odoo#120654
X-original-commit: 885c7bb33a3cb25962c090290e6b27bc11a71f41
Signed-off-by: Luca Vitali <luvi@odoo.com>
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
Simplify template so there are less code duplication between
editing state and non-editing state.
Also fixes following small style issues:
- missing opacity-25 when editing message of others
- expanded options of message come on top of jump present alert
closesodoo/odoo#120550
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit does the following in the Web module utilities:
- makes the `fieldDependencies` property of the field objects
definitions a function instead of a list of strings: this makes it
possible for fields to extract their dependencies based on the fields
info from the arch;
- adds/improves types and documentation for some utility functions.
Part of task 3121497
Part-of: odoo/odoo#112171
The pdf viewer sometimes displays the sidebar when we open the pdf
Solution:
Add `pagemode=none` to the url when opening a pdf in attachments
opw-3193516
closesodoo/odoo#120530
X-original-commit: bd5f00e2c1f183ec7bb299a1db64efbd0542eb49
Related: odoo/enterprise#40746
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Currently some auto_reply templates are internal as a means to prevent
notifying users everytime we send a reply to somebody.
This raises the issue that since responses to internal notifications
are themselves internal notifications, often nobody will be notified of
responses to these automated messages.
We fix this by marking these messages as auto_comments, which will
ensure responses to these messages are
considered non-internal (and thus 'discussions', by default).
task-2834304
closesodoo/odoo#94018
Related: odoo/enterprise#35466
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, when clicking on self-authored messages, it was
opening the form view.
It should neither open chat nor open form view for self-authored
messages.
closesodoo/odoo#120484
Signed-off-by: Debondt Didier (did) <did@odoo.com>
Before this commit, unread and needaction shown in messaging menu
was inconsistent with discuss sidebar.
In discuss sidebar, unread channel are bold, and needaction are
shown with badge + counter. In messaging menu, previews could be
either unread or needaction previews, and channels had 2 previews,
one for unread, and the other for needaction.
This commit make the messaging menu preview of channels more
consistent with discuss sidebar:
- channels have a single preview for unread and needaction
- unread messages make title bold, unread counter is no longer shown
- the counter displays needaction on this channel instead.
This commit also improves ordering of messaging menu items, so that:
- needactions have precedence over non-needactions
- unread channels have precedence over read channels
Task-3293723
closesodoo/odoo#120144
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
By this commit, If a user edits the message body or changes
the message attachments, the edited label in the blob,
shows the last edit Info.
Task-2664848
closesodoo/odoo#117896
Related: odoo/enterprise#40208
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when posting a new message in a channel in the
discuss app, a chat window of this channel was automatically open.
This happens because new message from self where considered
new messages in a channel, and all new messages in a channel
were automatically opening a chat window.
This commit fixes the issue by not making self-authored messages
automatically open the chat window.
closesodoo/odoo#120478
Signed-off-by: Debondt Didier (did) <did@odoo.com>
Before this PR, using the message component wihtout a thread could crash because
props.thread could be undefined (as thread is an optional props).
This PR just add the guard.
closesodoo/odoo#120233
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Before this PR, the `Updating the parent message of a reply also
updates the visual of the reply` test was failing in a non-deterministic
fashion.
This PR fixes this issue by replacing the `nextTick` by a specific
`waitUntil` in order to ensure the DOM is properly updated before
asserting.
Fixes 20829 runbot issue.
closesodoo/odoo#120273
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, when chatter message list was lower
than 2500px, the message-list had scrollable of 2500px
of height.
This happens because the area detecting present time was
always 2500px. thus making the content have this value as
scrollheight.
This commit fixes the issue by making presence area not
go above the conversation height. So if message list is
250px of height, then presence area is 250px, not 2500px.
closesodoo/odoo#120173
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In commit 2ecfed335d, we made the decision
to pass the domain to the field during extracProps with a getter in dynamicInfo.
This strategy causes the domain to be evaluated for all fields using it
in their extractProps. Very often we want to evaluate the domain on
an event, for example when a m2o is clicked on. The permanent evaluation
when using the widget therefore implies an unnecessary computational cost
for the evaluation and prevents the use of field.domain as a default value,
as it may be present in readonly views which never need the domain to be evaluated.
We will therefore convert the getter domain into a function that can be
called when we need the domain to be evaluated. This allows us to avoid
unnecessary evaluations and we can use field.domain as the default value
in the dynamic.domain.
closesodoo/odoo#120061
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- Open channel general
- type "#" in composer so it prompts "#general"
- delete "#"
- type "@" in composer
This happens because the partner suggestion part relies on raw server
data in model thread, `thread.channel`, which is erased from the
channel suggestion. This was used to detect whether partner is member
or not, in `thread.channel.channelMembers`.
This commit fixes the issue by making partner suggestion relies on
more reliable data in models, `thread.channelMembers`.
`thread.channel` is deprecated, and will eventually be removed.
closesodoo/odoo#119935
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
As a bonus, add cross-tab update for current user in chatter.
Part of task-3265211
closesodoo/odoo#120018
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this PR, link previews where not updated when a user was editing a
message.
This clear the current link previews and reprocess the updated message.
closesodoo/odoo#119917
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The opportunity is taken to clean the methods to make the override
actually possible.
Part of task-3265211
closesodoo/odoo#119942
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: web + adaptations in base, fleet, hr, hr_expense, hr_recruitment,
loyalty, lunch, mail, mass_mailing, note, project, stock, survey,
web_tour
**Foreword**
Since d19037e141 the rootnode class attribute for form/list views was
copied two times:
- on the o_view_controller div
- and on the root node of the view renderer.
Examples:
<form class="foo">...</form>
gives
<div class="o_view_controller o_form_view foo">
<div class="o_control_panel">...</div>
<div class="o_content">
<div class="foo o_form_editable ...">...</div>
</div>
</div>
and
<list class="foo">...</list>
gives
<div class="o_view_controller o_list_view foo">
<div class="o_control_panel">...</div>
<div class="o_content">
<div class="o_list_renderer foo ...">...</div>
</div>
</div>
**Issue**
This could lead to confusion and also unexpected styling issues.
See this PR #119815 to read a message JS Framework team has received.
See also another a fix that had to be made for x2m fields: 980244fa8
**Introduced Changes**
- in the form compiler, the root node attributes are no more copied to
the root div node of the compiled template the form renderer receives
- the root div node generated by the form compiler now has the
"o_form_renderer" class, which was removed during the recent form view
refactoring.
- the list renderer no more adds the root node class attribute to its
"o_list_renderer" div
- the X2ManyFieldDialog has been adapted too
- since View, X2ManyField & X2ManyFieldDialog both need to compute view
classnames derivated from the arch root node, an util has been
introduced to avoid duplicating code
- the whole codebase has been checked and adapted.
Related: odoo/enterprise#40418
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Before this commit, when accessing the discuss call settings
in non-localhost without SSL, there was the following crash:
```
"Cannot read 'enumerateDevices' of undefined"
```
Odoo uses zxing-js to detect devices within the discuss app.
zxing-js provides methods such as "hasNavigator",
"isMediaDevicesSuported" or "canEnumerateDevices" to check if
features are available. These are not called by Odoo before using
the related features what can result in a JS traceback.
This commit fixes the issue by showing a warning as a toaster
notification and in the dev tools, instead of a traceback.
The zxing-js methods are not exposed, hence the reliance on
truthy mediaDevices.
See also https://github.com/zxing-js/library/issues/225
Closes https://github.com/odoo/odoo/issues/112255
Closes https://github.com/odoo/odoo/pull/112813closesodoo/odoo#119903
X-original-commit: 32238dd680396c6ccb519aa8b3fb7487c38395f7
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>