This commit removes the last low level legacy stuff (e.g. Widget,
mixins...) from the backend bundle, and from the webclient bundles
of mrp_subcontracting and project. They are no longer used in the
backend. There're still necessary for the frontend and for the
web_editor though, so we had to manually add them in the lazy
loaded bundle of the editor. Hopefully, the last widgets and
dialogs will be converted soon, and we'll finally get rid of all
those legacy files.
Part-of: odoo/odoo#139154
The select2 library is only used in the frontend, now that the last
backend usecase (AceEditor) has been removed. This commit thus
removes the select2 library from the backend assets.
Part-of: odoo/odoo#139154
Now that the last Component using that helper have been fully
converted to Owl (AceEditorWrapper -> ResourceEditor), we can
remove it.
Part of task~3439226
Part-of: odoo/odoo#139154
By default, the SelectMenu component alphabetically sorts the
choices. Before this commit, this wasn't avoidable. As there's now
a usecase of SelectMenu where we want to enforce a specific order
on the choices (the website AceEditor), this commit introduces a
props `autoSort`, which is `true` by default, but which allows to
disable the sort.
Part-of: odoo/odoo#139154
This props allows to specify the initial width of the panel, whereas
before the initial width was the minimal width, i.e. the user could
only expand the panel, not shrink it.
Part-of: odoo/odoo#139154
This component has been introduced in web_studio. We have now a
similar usecase in website, for the AceEditor component. We thus
move the component definition to web.
Part-of: odoo/odoo#139154
The avatars coming from the TagsList component could not differentiate
if the `Many2ManyTagsAvatarField` was in readonly. Displaying an hover
state style when in list view.
This commit checks if the tag.onDelete is defined to render the span
containing the hover effect.
task-3514404
closesodoo/odoo#139455
X-original-commit: ac1757d96ab9ddda934b9b49ad41d83c9567e5b8
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In commit `2495bfa7259dcbd482b10c95a55313f86d594fcb` we introduce a fix
to adapt the kanban_card border using the border bottom of the prior
kanban_card as a border top allowing to display the outline effect.
This fix works for o_kanban_grouped but breaks the border in views that
are o_kanban_ungrouped. This commit fixes this by removing the
border-top only in the o_kanban_record that are o_kanban_grouped.
The :not(o_dragged) has been added as well to bring back the border when
the element is dragged.
task-3488451
closesodoo/odoo#139453
X-original-commit: 2be67ee122546273d12710c1c9bc3b7e11533b5d
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit reworks and simplifies the `getIFrame()` method in the
following way : instead of trying to find/guess the targetted element
ancestor's document and then looking in this parent for the iframe
containing the targetted element, it now uses the popperEl as parent for
the iframes who may contain the targetted element.
In practice, the only caveats is that it won't support multiple nested
iframes (which we shouldn't use anyway in our codebase).
Part-of: odoo/odoo#138847
This commit fixes breaking calendar view tests after the revamp done in
task-3455051 and task-3389317.
task-3455051
task-3389317
Part-of: odoo/odoo#138670
This commit adds the feature of saving the calendar state in the user’s
session storage. This allows the user to refresh the page and the sidebar will
be hidden/shown depending on what is saved in the session storage.
task-3455051
task-3389317
Part-of: odoo/odoo#138670
Currently the popover service is closed when you click away from the popover.
However, it’s not expected that the click event that closes the popover,
triggers another click event. This was causing a frustrating issue in calendar
where you would close the popover by clicking on the calendar, and it would
open the “new event” form view. The solution is to prevent default when
closing the popover.
task-3455051
task-3389317
Part-of: odoo/odoo#138670
This commit adds date information in the calendar header depending on the
scale that is being rendered. E.g. in yearly view, we show the year; in
monthly view, we show the month and year; in weekly view, we show the month,
the year and the week number; in daily view we show the day, the month and the
year.
task-3455051
task-3389317
Part-of: odoo/odoo#138670
The attendance dropdown is a switch button and "Needs Action" is no
longer visible on the popover (instead none of the buttons are selected)
The popovers are larger and the icons aligned. Their headers are the
color of their event.
The year view's event links inside the popovers have the same styling
as their event in the calendar.
task-3389317
Part-of: odoo/odoo#138670
We replaced the customized checkboxes with the original input element
with `.form-check-input` whilst still using the custom colors for more
consistency accross modules.
Avatars have the .o_avatar class added to them which allows us to resize
them with the CSS variable.
And SCSS has been replaced with utility classes where possible.
This commit has been moved here from
PR https://github.com/odoo/odoo/pull/127532
task-3389317
Part-of: odoo/odoo#138670
What's new:
- The overall style is softer, the borders lighter
- The event's colors are less bright
- In month view: The AllDay events and multiple day events are block
colors while the events with start/end times on a single day have a
colored circle.
- A header hosts the date title and navigation buttons (which were in
the sidebar)
- The sidebar is narrower and collapses
We've fixed the height issues giving us double scrollbars in some views.
The sidebar, when long, was pushing the content beyond the frame giving
us extra scrollbars. This has been fixed with a CSS grid and
`overflow-y` on the proper elements.
task-3389317
Part-of: odoo/odoo#138670
In some modules at Odoo we want to have custom headers for calendar. Since
fullcalendar accepts a function callback that should render the header, it was
decided to have this method exist in the calendar_common_renderer. So any
other apps that want to add something to the header, can just extend this
method. This commit also changes how homeworking changes the header so that it
complies with this change.
task-3455051
task-3389317
Part-of: odoo/odoo#138670
In google calendar, events in the past are shown with a reduced opacity. This
makes it easier to differentiate which events are past or not. This commit
implements the same feature.
task-3455051
task-3389317
Part-of: odoo/odoo#138670
Before this commit, the sync buttons for google and microsoft would appear in
the calendar sidebar even if the sync was not set (module not installed and
credentials not set). After this commit the buttons only appear in the sidebar
if the credentials for that service are set.
task-3455051
task-3389317
Part-of: odoo/odoo#138670
This commit changes how the calendar module calendar views look, as well as the
quick create form view for adding a new event.
task-3455051
task-3389317
Part-of: odoo/odoo#138670
This commit adds the feature of saving the calendar scale in the user’s session
storage. This allows the user to refresh the page and land in the same scale as
he had before. Also, if you switch apps, the calendar views will use the scale
saved in the session storage (unless a default scale is set using the mode
attribute).
task-3455051
task-3389317
Part-of: odoo/odoo#138670
In this commit we have fixed that when we give long user name then in task list
view it was overflowing so we have added mw-100 in span and text-truncate in the
div element.
task-3248965
closesodoo/odoo#139180
X-original-commit: b10053bdfbc95e2f587b451c2b4337a96a3ddb27
Related: odoo/enterprise#49193
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
We define some helpers to easily create condition trees and use them
where it is possible.
closesodoo/odoo#139377
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
steps to reproduce:
in a tree view export a large amount of data (or add a sleep in
/web/export/xlsx)
before this commit:
button is not disabled, allowing users to spam the button
after this commit:
button is disabled, informing the user that we're processing
his request
closesodoo/odoo#139392
X-original-commit: 56853574e10e8cf7d1dcec450db79d96d790f231
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Nicolas Danhier (nda) <nda@odoo.com>
Steps to reproduce
==================
- Go to budget analysis
- Switch to the pivot view
- Unselect the first three measures
- Save the current search and set it as default
- In the measures dropdown, there is only two measures remaining
Cause of the issue
==================
- When `context.pivot_measures` is used, the measures are computed from
it and those that comes from the metaData are missing.
opw-3544823
closesodoo/odoo#139315
X-original-commit: b11266cc377fa4753a0ee609258d9919f1ba5496
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
This commit is part of a serie of commits which aims at simplifying and
reorganizing js files in the web addon
closesodoo/odoo#139156
Task-id: 3508223
Related: odoo/enterprise#49212
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Since the new milk theme, the clickbot for click everywhere, didn't set
the filters on the views.
Now, the clickbot set all the filters on the views. This commit also add
a test suit, to avoid future downgrades. This commit transform the
clickbot to a module ES6.
task-id 3535596
X-original-commit: e2f531ec47e4f946cc37afee6b65531a637b5dfe
Part-of: odoo/odoo#139032
The PR https://github.com/odoo/odoo/pull/104741 have recently modify how the modifiers required, readonly,
invisible, and column_invisible are defined. They are now given by Python
expressions instead of domains. In this PR we introduce two main new
components ExpressionEditor and ExpressionEditorDialog that allow to
edit/view a Python expression in a way similar to what is done in the
DomainSelector/DomainSelectorDialog. For this we have extracted the main
logic found in DomainSelector and moved it to a new component TreeEditor
that is used by both ExpressionEditor and DomainSelector. For this we had
to add a new type of leaf we call "complex condition" that allows us to
represent indecomposable (sub)expressions, i.e. expressions we cannot
(or don't want) to express as conditions of the form (path, operator, value).
The main mappings allowing to transform trees, domains, expressions into
one another (when possible) are to be found in
@web/core/tree_editor/condition_tree.js.
closesodoo/odoo#136258
Related: odoo/enterprise#48512
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Carion <juca@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Pierre Pulinckx <pipu@odoo.com>
Purpose:
--------
The "KanbanPropertiesField" has been renamed to "CardPropertiesField".
For consistency, the key "view_in_kanban" of the properties definition
is renamed to "view_in_cards"
Task-3458627
Part-of: odoo/odoo#132578
Purpose:
--------
This commit rewords the "KanbanPropertiesField" to "CardPropertiesField"
and add it as widget to use for properties fields in calendar views.
The rationale is that the "Show in cards" option of properties should
allow to enable the visibility of properties in kanban cards and in
calendar popovers (as it is currently the case in knowledge).
Task-3458627
Part-of: odoo/odoo#132578
Purpose:
--------
This commit removes the "hideKanbanOption" from the properties field.
This option allowed to prevent users to make properties visible on cards
(kanban cards and calendar popovers).
The rationale being that there is no reason to prevent users of adding
properties on cards now that they have been redesigned (see commit [1]).
Task-3458627
[1]: https://github.com/odoo/odoo/commit/25e8fbe0a1327c289df826cf6eb7882098a4c325
Part-of: odoo/odoo#132578
Since https://github.com/odoo/odoo/pull/137098, we add a fallback for
false display_name in the form view, but we didn't add it for the list
view which doesn't instantiate the Many2one component. It uses
`formatMany2one` instead. Fix it to be consistent with the Many2one
closesodoo/odoo#139215
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Since https://github.com/odoo/odoo/pull/137098, in
`Accounting > Bank > Tree View`, you get a traceback if one of the bank
statements in the view has a false as `display_name` (name is only
required in the view not in the model). The traceback comes from the
`extraLines` accessor in the Many2one component. The fix is the same
as in https://github.com/odoo/odoo/pull/138061 (FW of the first PR).
Part-of: odoo/odoo#139215
This commit removes the legacy global bus (core bus) and the places
where it was used.
The main users of this bus were the public widgets, they now use the bus
on Component.env.
Some of the uses were dead code and has been removed.
closesodoo/odoo#139076
Task: 3439226
Related: odoo/enterprise#49131
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
*: mass_mailing, test_website, web, web_editor, website, website_event,
website_sale
This commit removes jQueryUI draggable and droppable component to
instead use our own implementation of the feature. This replaces the
last use of the lib: the web_editor drag and drop. This takes advantage
of the code that was already written for other features of the backend.
task-3079246
closesodoo/odoo#136793
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The first intention of this commit was to remove ´@extend´ but
it actually makes sense to remove ´.oe_left´ and ´.oe_right´ classes.
Since grid we can avoid "float" elements (see .oe_subtotal_footer)
and we only have to remove this class.
For the other case, we have to use ´.float-start' and ´float-end´
to replace ´oe_left´ and ´oe_right´.
closesodoo/odoo#139199
Related: odoo/enterprise#49211
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit removes the caret from the statusbar side dropdowns as it
was not intended to appear and causes the buttons to be misaligned.
closesodoo/odoo#139168
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Before this commit, if you click twice on a record in x2many, two dialogs
are opened containing the same record.
Solution:
=========
Prevent a record from being opened as long as a record in this x2many
is already open.
How to reproduce:
=================
Go to a form view with an x2many
Click on the first record in the x2many
Click a second time on the record of the x2many (before the dialog is opened)
Before this commit:
-------------------
Two dialogs are opened with the selected record
After this commit:
------------------
Only one dialog is opened with the selected record
closesodoo/odoo#138984
X-original-commit: 31a9b13
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
The command palette has the priority when useAutoFocus is call.
Like that, the command palette will not lose focus when clicking
on an app on the home menu and then directly opening the command
palette before the app mounting
TASK ID: 3338117
closesodoo/odoo#139124
X-original-commit: 660d27ac38c225559ea3697a24a34ac70ede8ec1
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
Before this commit:
- project.task > list view: Currently, the progress is displayed
in purple if less than 100% and in red if above. The two colors
don't contrast a lot, making it hard to read. In addition, it
is not coherent with the color we usually apply for the remaining
hours in the rest of the app.
- onbording tour: the manual saving step is no longer necessary
as records are now automatically saved. In addition, showing it
doesn't provide a wow effect and is an extra opportunity to lose
people in the process
After this commit:
- the following color code was applied for the progress bar:
*if progress < 80 -> green
*if progress is between 80 and 100 included -> orange
*if progress > 100 -> red
- step removed.
task-3475170
closesodoo/odoo#132854
Related: odoo/enterprise#46162
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps to reproduce
==================
- Install purchase_product_matrix,web_studio
- Go to purchase
- Click on a record
- Open studio
- Click on the "Products" tab > Edit List view
- Edit the product field
- Widget: Many2one
- Disable creation: enabled
- Close studio
- Create a new record
- Add a new line
- Type some random text in the product field
-> The option create is available
Cause of the issue
==================
When the can_create attribute is not passed, the `canCreate` ends up
undefined. This means the default value of true is used and the
`no_create` option is ignored.
The can_create attribute should actually be passed and there is a bug in
python in the `_editable_tag_field` function, but it is not something we
can change in stable due to the fact it it requires an explicit change
in some views to pass the validation and thus, this requires an addon
upgrade (`-u ...`).
See https://github.com/odoo/odoo/pull/138032
opw-3432903
closesodoo/odoo#139068
X-original-commit: 4b6756e1775488e230bc25767adf5744f0ea9149
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Currently, when a user has access to a branch of a company, but not to
the company itself, the branch will not show up in the company switcher.
As a result, the user is not able to switch back to that branch when
logged in to another company.
To fix this, we now show the whole hierarchy of the branches you have
access to, disabling the companies/branches you don't have access to.
task-3503204
Part-of: odoo/odoo#138942
Before this commit, if a view contained a searchPanel the scrollbar went at the top automatically; now the behavior of the scrollbar with or without a searchPanel is the same.
closesodoo/odoo#138341
X-original-commit: b8f881de82ab931ed8bf45e67dd8b28f943e733f
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Before this commit, adding more records to a many2many field than the
limit of the pager did not update the pager. This commit fixes this
issue by updating the limit of the pager.
closesodoo/odoo#138883
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The purpose of this commit is to delete the legacy/js/core/time.js file.
We have therefore replaced all calls to time.js with the l10N/date.js utilities.
Part of task 3439226
closesodoo/odoo#138609
Related: odoo/enterprise#48918
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Correspondent in thread can be null and lead into crash
when getting thread action and im status.
Replace correspondent with chatPartner when type is chat.
The fix is to solve the problem so that it is not blocking
systray and chatWindow tests related.
Also, this fix small issue of systray overflowing issue.
closesodoo/odoo#138913
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>