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>
The color refresh button in the document layout configuration modal is
misaligned and moves the content when clicked
This commit adapts the CSS to have a proper absolute placement and
apply a height on the o_field_widget in this view to fix the issue.
task-3378759
part of: task-3326263
closesodoo/odoo#138774
X-original-commit: 907373d6e7556ecd17b0c0a87b3705e242f9d628
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
The kanban card do not display their outline on the bottom side of the
card. This is due to a negative margin (used to compensate for the
border bottom of the card).
This commit removes the border top if the kanban_record as a prior
kanban_record sibling, using its sibling border_bottom as its border
top and getting rid of the negative margin.
task-3488451
closesodoo/odoo#138772
X-original-commit: bf89d4ec951c77f5c7a01ccbad5edf0f7110f706
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
The NotificationItem component has been modified to support a new slot
allowing to display some content at the right of the notification item.
It is used in this commit to display an additional 'Install button',
inviting the user to click on the notification. Note that the entire
notification is still clickable, it is only a visual indicator.
Once the notification is clicked, the installation process is triggered:
- In case the system supports the native installation prompt, we now
display it, and the user is free to install the PWA from there.
- On Apple devices, a custom popup is displayed to the user, explaining
the steps to install the website as an application, since iOS and macOS
don't support a native prompt, and won't be using one anytime soon, since
it's a design decision from their side.
Some tests have been added to mock and test the display of the notification.
patchBrowserWithCleanup has been adapted to also remove any BeforeInstallPromptEvent
for every tests by default. This allows to test without the risk of issues with
messaging tests reading the number of notifications, or clicking the first
notification item when the service checks whether the prompt can be shown
or not (depending the availability of a native prompt, the OS, or the
localStorage, etc.).
To test the service correctly, you need to patch the test accordingly.
task-3275275
closesodoo/odoo#135866
Related: odoo/enterprise#48968
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Before this commit, the status bar field could be displayed in 2 ways:
- in small screens: as a dropdown
- in larger screens: as an inline list of buttons
This commit centralizes both of these approaches into a dynamic display
that fits the available space:
- the current stage is always displayed;
- previous stages are displayed behind or contained in a dropdown if not
enough space;
- next stages are displayed behind or contained in a dropdown if not
enough space.
Task 3336856
closesodoo/odoo#124267
Related: odoo/enterprise#48706
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Prior to this commit the knowledge icon from the same dropdown was
turned into an inline-svg but the dashboard one was not.
This commit aims to use an inline-svg for that icon and ensure it
renders correctly.
task-3072562
closesodoo/odoo#138279
X-original-commit: 4df55bbc7bfe0bbe62605cd88887d45460814964
Related: odoo/enterprise#48734
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Purpose
=======
The goal is to be able to have a hierarchy view to see the organisation of a company, that is, to have organisation chart for `hr.employee` model.
To do that, a new view will be introduced in `web_hierarchy` module, called `Hierarchy` view and it will first be used in `hr_org_chart` module for `hr.employee`, `hr.employee.public` and `hr.department` models.
Implementation details
----------------------
- A new python method will be introduced in the models when `web_hierarchy` module is
installed. That method, called `hierarchy_read`, is created to fetch the data for the
hierarchy view when the view will be loaded.
- The definition of hierarchy view is inspired to the definition of the kanban,
that is, a template called `hierarchy-box` has to be defined in the arch to draw the card
displayed in the node of the hierarchy view.
- Some attributes can be defined on the `hierarchy` tag:
- `parent_field` (default='parent_id') contains the parent field name
to use to fetch the parent record and to be able to fetch the hierarchy.
- `child_field` (optional attribute) contains the child field name
to use to find the child records (it is in fact the one2many field).
If that field is defined then some queries can be avoided since we
directly fetch the children when a read/search_read is done.
- `icon` (default='fa-share-alt o_hierarchy_icon') icon displayed inside the
`Unfold` button (to show the child nodes) in hierarchy node.
- `draggable` (default=False) True to allow the user to drag and drop a
node (= record) into a row or another node to update its parent node.
task-3376776
closesodoo/odoo#131162
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, the icon of the hierarchy view should be rotate
of 90 deg to have an appropriate icon for the view. The problem is
since the icon class is added on button classes, the button will
also be rotated with the icon instead of just the icon.
This commit defines a `i` tag inside the `button` element to select
the view to be able to apply css rotation only on the icon instead
of the whole button.
task-3376776
This commit extends the kanban compiler for the hirarchy view. Some
changes has been done in the kanban compiler to be able to reuse the
existing code.
task-3376776
Before this commit, when search menu is not displayed in the
search view, then the border right is missing.
This commit removes `border-end-0` class added in the search view
to always have a border. Even with the search menu, it does not
seem to have an extra border.
task-3376776
Before this commit, `child_of` operator is managed in the mockServer
but not the `parent_of` one.
This commit manages `parent_of` operator in mockServer to be able
to find the record when the domain used contains that operator
task-3376776
Better API as the arrow was not displayed when the fixedPosition
prop was true, which is as we were mixing apples and pears.
And as for the animation prop, it permits to remove the hacky
"o-fast-popover" class usages.
closesodoo/odoo#135188
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
**Before this commit**
The usePosition hook takes two arguments:
- the target element (could be a function returning an element)
- the positioning options, which are optional.
This API is a bit weird for these reasons:
- the target argument's type is variable
- the "popper" option is not very meaningful and has a
default value of "popper", which is not clearly stated
**After this commit**
The usePosition hook now takes three different arguments:
- first is "refName", which is the reference to the element to position
in the template
- then is "getTarget", a callback that must return the target element,
- finally the "options"
Part-of: odoo/odoo#135188
This commit seperates the static and color dependent rules for the
Calendar view and app to avoid duplicating the static ones.
task-3546717
Part-of: odoo/odoo#138615
Since [1], invisible attributes on views are no longer evaluated
server-side. In search views, field and filter nodes can have an
invisible attribute which can be static ("1" or "True") or dynamic,
depending on the context (e.g. "context.get('something')"). Before
[1], in the arch received by the client, the value of the invisible
attribute was always static as "context.get(...)" expressions were
evaluated server-side. This is no longer the case, and we thus have
to evaluate the expression client side.
Before this commit, the invisible attributes in search archs were
simply ignored if they weren't static. This could be observed for
instance in Project > open a project: the "Private tasks" filter
was available even though it is dynamically invisible, and shouldn't
be there.
This commit ensures the invisible attributes are always taken into
account and evaluated.
[1] odoo/odoo@ba1a5509faclosesodoo/odoo#138590
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Currently, the newly created component `MultiRecordSelector` (https://github.com/odoo/odoo/commit/bd0f2c6d799961b0a41222652eae7214c01dc5fe)
does not support the keyboard navigation between its tags (selecting or
deleting a tag). This behavior is currently implemented in the
`Many2ManyTagsField` component. This commit extract this behavior from
the `Many2ManyTagsField` component into a new hook that will be used by
the `MultiRecordSelector` component.
Part of task-id 3433922
Part-of: odoo/odoo#138464
This commit removes all the legacy envs (common_env, env, public_env)
as well as the files used to set up them.
task 3439226
closesodoo/odoo#138348
Related: odoo/enterprise#48781
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>