Commit Graph
13594 Commits
Author SHA1 Message Date
Adrien Schoffeniels 33ebfd68a0 [IMP] web: adapt draggable_hook_builder for new sortableList hook
Purpose:
--------
Knowledge's sidebar revamp introduces a new draggable hook "SortableList"
that is meant to replace the usage of jQuery's sortable widget and of the
NestedSortable library previously used for the sidebar.

To be able to build this hook using the `draggable_hook_builder`, some
changes have been introduced:

- Do not remove the height of the dragged element when computing its max
allowed height (so that the dragged element is below the cursor even when
the cursor is at the max allowed height, instead of being on top of the
lasts elements, obstructing the view)

- Allow to define mandatory params in the built hook's default params, so
that one does not have to define this mandatory param for each instance of
the hook (eg. SortableList is intended to only work with `li` elements)

Task-3074123

closes odoo/odoo#107490

Related: odoo/enterprise#34788
Related: odoo/upgrade#4118
Signed-off-by: David Beguin (dbe) <dbe@odoo.com>
2023-06-08 17:40:13 +02:00
Romeo Fragomeli 976491e012 [IMP] web,*: add accordion menu component
* = project,website

On the small screen, the sub dropdown is a bit weird to positioning, so
we use an accordion instead.
We apply this change also on desktop to avoid split behavior between
small screen and bigger screen and also to avoid duplicating code.

Also, we have made some DOM/CSS change:
* avoid reflow of the search bar menu by adding a min-width on the
  columns and a max-width on the input for custom groupbys and favorite
  filters
* re-align caret vertically for accordion indicators
* reword favorite edition items and add a tooltip
* all menu items have the class `o_menu_item`

closes odoo/odoo#122635

Note: DOM and some tests were adapted to reflect the change
Task-id: 3276542 (Part of)
Related: odoo/enterprise#41563
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-08 16:10:05 +02:00
Lucas Perais 1c1aaa883c [FIX] web: list: _view_ref and search_default should not be passed down
Have an action with *_view_ref and search_default_* context keys.
This action has a list view that itself has a many2many_tags field
(it is editable for simplicity's sake)

click on that many2many_tags field and click on the search more item.

Before this commit, the action's context keys *_view_ref and search_default_* were passed
down all the way to the field and to the search more dialog, causing, inevatibly, crashes.

After this commit, those keys are not passed and there are no crash.

opw-3226398

closes odoo/odoo#124252

X-original-commit: 47eab4d987d8cb91a30507c6c33348d1945698f1
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-06-08 14:32:43 +02:00
luvi 0302e2f4df [IMP] web: add onInput props to SelectMenu
This commit adds the onInput props, allowing to run code from the parent
of the SelectMenu depending on the search value. This can be used in
situations where the list of choices must be dynamic. Also, whenever the
list of choices or groups is edited in length, the menu is filtered using
the newer values.

For example, choices can be generated from a fetch of items. Now, instead
of loading all items before instanciating a SelectMenu, a limit could be
set during the fetch, and another fetch can happen as the user type.

A test has been added to verify that the onInput props is called correctly,
and executes its code. In this test, the list of choices is edited, and we
assert that the newer elements are present in the menu.

closes odoo/odoo#124224

Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
2023-06-08 13:10:14 +02:00
Damien Bouvy 227e089efc [FIX] web: restore calendar navigation
Since the new 'milk' backend theme, we removed previous/next buttons in
the calendar view and made the mini-calendar the main control mechanism
for the calendar view: users were expected to discover that clicking on
a specific date in the mini-calendar would change the main display to
the period encompassing said date (e.g. if the calendar is in week moed
and I click on June 7th 2023, I would see the week of Jun 5-11)

As it happens, it is rather coutner-intuitive and users expect to find a
clearer control mechanism (and I don't blame them).

This commit re-introduces such controls in the sidebar, next to the
period selector.

closes odoo/odoo#123978

X-original-commit: 89897d0902c6e14bcd03fd9853f2fadbe7f348e3
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-06-08 10:26:40 +02:00
Julien Mougenot 5ac7185ad7 [FIX] web: Full error message in XML assets loader
Before this commit, the error message thrown by the XML assets loader
was designed only for Chrome and logged only part of the error message
(without the actual reason of the parsing error).

This commit ensures that the entire error is logged to comply with all
browsers implementations and have all informations regarding the error.

closes odoo/odoo#124212

X-original-commit: 9d3dbd5f62e0cf8fbd1c64dfd87d2b22610cbf17
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-06-08 01:24:45 +02:00
Jordan D. (Joda)andNicolas Lempereur 6c8ad13c65 [FIX] web: error when checking amount in currency
How to reproduce
================

* Install the account_accountant module
* Go to `Journal Items`
* Select the pivot view
* Select the measure `Amount in Currency`

=> A traceback will occur

Cause
=====

Field amount_currency has group_operator set to none to avoid grouping
several amount in different current together.

Proposed fix
============

If the `group_operator==None`, The field will not be shown as
aggregator.

opw-3061776

closes odoo/odoo#124179

X-original-commit: beccce4d5ec26e885c06c5af4cb1d6147cb0e91f
Related: odoo/enterprise#42127
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
2023-06-07 21:34:48 +02:00
Simon Genin (ges) 02c20cb540 [FIX] web: CopyClipboard field css tweak
Remove overlapping bottom border of the input since the field is boxed.
Add 4px of left padding to the input not to have the cursor overlapping
the box and feel crowded.
Remove the "action" button left border radius.

closes odoo/odoo#124150

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-06-07 15:59:02 +02:00
Bruno Boi e68c1d7308 [FIX] web: account for popper margins from style
**Before this commit**
Since [1] poppers margins computed from the style are
not taken into account.

**Additional note**
The commit [1] has been backported to 16.0 branch
right in front of this commit.

**After this commit**
This commit fixes that by taking those margins into account.

[1] b9551a50

closes odoo/odoo#124113

X-original-commit: 453f38527d0d232c886daa9dc71717f678918064
Signed-off-by: Damien Abeloos (abd) <abd@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-06-07 14:43:24 +02:00
Thomas Lefebvre (thle) f38732a85d [FIX] web: add default title when quick create event
Steps to reproduce:
-------------------
- go to a task in a project;
- in the chatter, schedule an activity of type "Meeting";
- click on open calendar;
- click anywhere on the calendar view.

Issue:
------
The event title is not pre-filled.
The name of the task must be noted each time.

Solution:
---------
When it is possible to create a "Meeting" type activity,
it is sometimes useful to have the name of
the record pre-filled on the quick create dialog.

opw-3324920

closes odoo/odoo#123964

X-original-commit: 5c738ba5525833d3bd4e32f3e4e9cf00ea129427
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-06-07 14:43:19 +02:00
Bruno Boi e73c533c72 [FIX] web: fix ModelFieldSelectorPopover arrows
Since [1], the model field selector popover has some style in order to
give its pointing arrow a custom color.
But the style only takes into account the upside arrow.
It should also take into account the downside arrow as this popover does
have the ability to switch direction when it could clip outside of
the viewport.

**Before this commit**
![top before]
![bottom before]
![left before]

**After this commit**
![top after]
![bottom after]
![left after]

[1]: bd4862774264c5169aa2dcf4cd80908c2f4c71bb
[left before]: https://github.com/odoo/odoo/assets/1159815/68387876-8372-4f6a-8a53-1ce1132547a0
[left after]: https://github.com/odoo/odoo/assets/1159815/5c80b095-efdd-4927-86fb-887d0a18fc3e
[bottom before]: https://github.com/odoo/odoo/assets/1159815/2bc2b5b4-ec90-4e10-ba6e-173ebeba9815
[bottom after]: https://github.com/odoo/odoo/assets/1159815/284a4e3c-db41-4d3d-ba5e-e6522c641770
[top before]: https://github.com/odoo/odoo/assets/1159815/b43ad7a9-e02f-451b-9871-707e5abdd694
[top after]: https://github.com/odoo/odoo/assets/1159815/efce4370-bf27-4ea8-8d65-e8bb2e9d9909

closes odoo/odoo#124038

X-original-commit: 3d8c55ce62cd5f21c18c1a50820ac551e9d98855
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-06-07 10:45:39 +02:00
Romeo Fragomeli d8128cb881 [FIX] web,website: website filter doesn't appear anymore
Since commit [1], the custom filter for website was disabled.
This commit restores the filter and adapts it for "Milk" redesign.

Steps to reproduce:
* Open the Website app
* Select the menu "Site" -> "Pages"
* Open the "Dropdown" in the SearchBar
  => Bug there is no filter for website

[1]: odoo/odoo@caef16ee4e

closes odoo/odoo#124042

X-original-commit: 9237ca777fb9c5e9bda03c2d0dbe0deed8e1b2e5
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-06 22:54:44 +02:00
Aaron Bohy f40ab7c811 [FIX] web: BasicModel: clear x2many changes after save
Before this commit, after a save, we didn't remove the changes in
x2many fields (StaticList). As a consequence, if save was called
twice on a record with changes in a x2many, those changes were
sent twice to the server. In particular, if those changes involved
a command 0 (create), the record was created twice.

To reproduce the issue, go to a sale order, add a line, select a
product, click out to validate the row, then click several times
on the product. As you clicked several times, several doAction are
asked to the action service. For each of them, the form view is
asked to save its changes, and thus the same row is created multiple
times.

After this fix, the changes in x2manys are cleared after the first
save, so there's no change the save for the subsequent calls.

opw-3268947
opw-3324848

closes odoo/odoo#123851

X-original-commit: 9073304660ee64c7051b7ed86f8fa3513fe6ba7a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-06-06 11:45:22 +02:00
luvi 13aafd4a2f [FIX] web: allow expanding fields in export dialog after search
This commit fixes the display of subfields in the export dialog. Currently,
after a search, the results are filtered to only show the matching results.
But when unfolding an expandable field, the results are not shown below. It
is only set visible after the search has been modified to rerender the list
completely.

Now, with this commit, the list is updated as the field is unfolded.

A test has been added to verify that the element is loaded and displayed as
expected.

opw-3316900, opw-3302785

closes odoo/odoo#123707

X-original-commit: bc18cd55f97ec6119717455217372bac161c9b07
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-06-05 16:17:15 +02:00
Chrysanthe (chgo) d0940ae7d0 [FIX] web: revamp superuser navbar
This commit introduces a revamp of the superuser navbar. The element
was using some unnecessary styling that could be removed.

Instead of using a gradient as background, we now use a transparent box
with a gradient as border.

task-3337789
part of task-332626

closes odoo/odoo#123613

X-original-commit: 98183ae2e9e3207a64f6438edf1027b6a708dbdd
Related: odoo/enterprise#41916
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-05 14:50:05 +02:00
Mathieu Duckerts-Antoine d2637f617d [IMP] web: search model: merge =, in values in facet descriptions
A domain of the form ["|", ("foo", "=", "a"), ("foo", "in", ["b", "c"])]
created via the domain selector will be presented in the search bar as
"Foo in ( a , b , c )". That is we make the fusion of some
conditions and use parenthesis and commas to separate the values in order
to get shorter facet descriptions.

closes odoo/odoo#123352

X-original-commit: 3d2580db3225382ab745250b28845f6cb95cbd27
Related: odoo/enterprise#41814
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-06-05 13:31:48 +02:00
Mathieu Duckerts-Antoine 1d77694b95 [IMP] web: domain selector: add a 'New Rule' button
In edit mode, we add a 'New Rule' button at the bottom of the domain
selector to make easier to add a new condition.

X-original-commit: 2e761f8965909e4b11d3319c48bd5416c414961f
Part-of: odoo/odoo#123352
2023-06-05 13:31:48 +02:00
Mathieu Duckerts-Antoine 2860156adf [FIX] web: domain selector: always show connectors
When a domain with a single condition is displayed in a domain selector,
the implicit connector "&" or "|" is not displayed. This makes the
operation 'Add node' less obvious in that case since it is not known how
the new condition will be combined with the others.
Here we always display the connector to solve that problem.
As a by-product, we get another problem solved: a domain of the form
["!", ("foo", "=", "abc")] was incorrectly displayed.

X-original-commit: bd57f20980734641ce405bd34d8b17dc780adb17
Part-of: odoo/odoo#123352
2023-06-05 13:31:48 +02:00
Mathieu Duckerts-Antoine 606bc349e9 [FIX] web: search model: remove quotes in facet description
When a new search bar facet is created via the domain selector dialog,
quotes are sometimes put around some parts of its description, e.g.
Country = "Belgium". We make the facet description more readable by
removing those quotes.

X-original-commit: 2c12980e129acf9ffe5e1e474d3dee6abb7adfe4
Part-of: odoo/odoo#123352
2023-06-05 13:31:48 +02:00
Pulinckx Pierre (PIPU) f2a8e6bd51 [REF] web: Remove underscore.js
Underscore.js has been removed from legacy qweb engine
and from web manifest.py
range and uniqueId functions has been added to qweb
engine to replace usages of them in xml templates.
Underscore usages has been remove from xml templates.
taskId : 3246238

closes odoo/odoo#123018

Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-06-05 13:31:35 +02:00
Bruno Boi 4e3f84f394 [FIX] web: correct small KanbanConfigMenu position
**Before this commit**
Since afbdce664 the kanban group's config menu is not contained
into its kanban-group element but in the kanban-header element.

This lead to a wrong placement when the dropdown only has one item.

As this case is rare, it had not been noticed.

**To reproduce**
Steps:
- Install project_enterprise app.
- Share an editable project with Joel Willis
- Make sure in the project's settings than its visibility
is set to public (selection value: 'portal')
- Log in as portal user
- Access http://your-odoo-db/my/projects/1
- Open a kanban group's config dropdown menu.

Issue:
- If it has only one item to display, it will be placed on the left of
  its toggler instead of the bottom.

**After this commit**
It is now contained with the same element as originally intended.
The menu is now properly placed in the bottom.

**Note**
Not tested as this was (and still is) a workaround for
a stacking context issue.
The core Dropdown component is being refactored and
its "container" prop will become useless:
meaning this piece of code will disappear.

task-3293310

closes odoo/odoo#122944

X-original-commit: 1de541db9c6b02830615f078d4d44fd785146d35
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-06-05 13:31:32 +02:00
Bruno Boi 4034e5909b [FIX] web: ignore iframe offset for some poppers
Since d6afa9f usePosition hook allows to position
elements (a.k.a. poppers):
- that are outside of an iframe
- that target an element within an iframe

But there are also use cases where the popper is
within the same iframe than its target.
Therefore, in those cases, we should not offset the position
with the iframe box values.

**Before this commit**
The positioning hook always offsets the position if the target
is within an iframe.

**After this commit**
The positioning hook will offsets the position with the target's iframe
(if there is one, obviously) ONLY if the popper is within another
document.

**Observable use-case (steps to reproduce)**
Steps:
    - Install project_enterprise app.
    - Share an editable project with Joel Willis
    - Make sure in the project's settings than its visibility
      is set to public (selection value: 'portal')
    - Log in as portal user
    - Access http://your-odoo-db/my/projects/1
    - Click on search bar.

Issue:
    - The search dropdown is far away from its input.

task-3293310

X-original-commit: 208a1277750d63eef31079935e041730bc7204d5
Part-of: odoo/odoo#122944
2023-06-05 13:31:32 +02:00
FrancoisGe 90ac1f58f5 [FIX] web: aggregate monetary in list
The goal of this commit is to display the correct number of digits for
aggregates of monetary and float fields using the monetary widget in
list view. The number of digits must match that of the currency.

The master commit e96566e already solves
the problem for monetary fields, so we're going to add support for
float fields with the monetary widget.
So we're going to backport this commit.

closes odoo/odoo#123614

X-original-commit: 505155753d6e05fbb4580ce74d9f5844a1fa45a9
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
2023-06-02 23:39:35 +02:00
Hubert Van de Walle (huvw) 708f15c9b1 [FIX] web: don't use the compileButton fn for bootstrap toggles
Steps to reproduce
==================

- Use a mobile (xs) viewport
- Go to sign
- Click on "Action"

-> InvalidButtonParamsError

Cause of the issue
==================

The bootstrap button should not be compiled as an action button

Solution
========

Don't call compileButton for button with the data-bs-toggle attribute
We also need to cancel the global click to let bootstrap handle the
action

opw-3278906

closes odoo/odoo#123579

X-original-commit: 5f569eedf9ed4e19b1fab1c83f7d315684097a7f
Related: odoo/enterprise#41906
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-06-02 23:39:24 +02:00
Hubert Van de Walle (huvw) 2d4634df5f [FIX] web: use field digits in grouped list view
Steps to reproduce
==================

- Enable debug mode
- Go to Settings / Technical / Database Structure / Decimal Accuracy
- Set the "Product Unit of Measure" to 3 digits
- Go to Inventory / Reporting / Locations
- Group by company

-> The "On Hand Quantity" is formatted with 2 digits

Cause of the issue
==================

The field is declared as follows

```py
inventory_quantity_auto_apply = fields.Float(
    'Inventoried Quantity', digits='Product Unit of Measure',
    compute='_compute_inventory_quantity_auto_apply',
    inverse='_set_inventory_quantity', groups='stock.group_stock_manager'
)
```

Solution
========

We should fallback to the field digits if the digits are not set on the
arch, such as this

https://github.com/odoo/odoo/blob/1cd49304ef118e667bd14fd5fa78a0baba47bb4a/addons/web/static/src/views/utils.js#L152

opw-3328657

closes odoo/odoo#123543

X-original-commit: f4ecb7ff0c166c7e58ea99711868a30ea3a7fda7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-06-02 23:39:11 +02:00
Maruan Aguerdouh (magm) ba444ee90f [FIX] web: z-index of properties field popup don't go below subtask form
Steps to reproduce:

- Install Project app and activate Sub-tasks.
- Go to any project > a task > go to subtasks and add a new line.
- In the next popup, create a whole new subtask, and try to add a new
property field to this subtask.

Issue:

The z-index of the properties field popup is lower than the subtask form
popup, so it goes below it.

Solution:

Changint the current the z-index from the `o_property_field_popover` for
the $zindex-popover which will make it go above the subtask form popup.

opw-3174888

closes odoo/odoo#123541

X-original-commit: 15e22367a290903c26c8c18d85ecaa2a708d99b0
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-02 23:39:01 +02:00
Bruno Boi bbb5e2bc47 [FIX] web: display signatures in signature fields
**Before this commit**
Since [1], the signature field only display placeholder
signatures when it has a value.

**Explanation**
The commit [1] removes the props "value" from the standard field props.
The signature field missed an adaptation.

**After this commit**
The issue is fixed and a test has been written.

[1] 688986f888
opw-3335655

closes odoo/odoo#123463

X-original-commit: 4edc5e3326cc92e9adf4f2512af1e85382108bb3
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-06-02 22:29:28 +02:00
Aaron Bohy 6d9108b611 [REF] web: BasicModel: simplify evalContext logic for x2manys
Before this commit, 4 different usecases where considered when
computing the value of an x2many field to put in the evalContext:
 1) evalContext to evaluate a context used client-side
 2) evalContext to evaluate a context used server-side
 3) evalContext to evaluate a domain used client-side
 4) evalContext to evaluate a domain used server-side

For 1, 3 and 4, the value of the x2many was the list of ids in the
relation (in the case of one2manys, new, virtual, ids were filtered
out). For 2, the value was a list of commands. This doesn't make
much sense, and doesn't appear to be used. This has likely been
encoded when we developped the new views in v11, when we kind of
reverse engineered the specs.

As we are currently rewritting the BasicModel with a new version of
onchange, where the semantics of x2many commands change, this old
spec makes even less sense. Indeed, the new command semantics only
encode what has changed, whereas currently the commands encode the
whole value of an x2many, like if it was recreated from scratch.

We thus decided to simplify the evalContext logic by always
evaluating x2manys to the list of (existing) ids in the relation.

Part of task 3179751

closes odoo/odoo#123439

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-06-02 22:29:20 +02:00
tsm-odoo 20c1772d35 [REF] im_livechat, *: refactor livechat
This PR refactors the public livechat in order for it to use
owl and to rely on the discuss components as much as possible.

task-2212347

closes odoo/odoo#122834

Related: odoo/enterprise#41636
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-02 22:29:06 +02:00
MerlinGuillaume de2bdc87a7 [FIX] web: mark integer fields as invalid if the value exceeds 32 bits
When we enter an integer in a field and the value cannot be encoded in
32 bits, an error is thrown but the field is not marked as invalid

Steps to reproduce:
1. Install Employee Referral
2. Go to Referrals > Configuration > Levels and create a new level
3. Add a name and an image and set the requirements to 9,999,999,999
   points
4. Try to save the level, an error is thrown (in v15, a notification
   would inform the user the field is invalid)

Solution:
Throw an error in parseInteger when the value exceeds the 32 bits
encoding limit

Problem:
PostgreSQL uses 32 bits for integers

opw-3300851

closes odoo/odoo#123401

X-original-commit: c662a54606799cf3348aed84584e75d2ab6f20e5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-06-02 12:04:21 +02:00
Hubert Van de Walle (huvw) ea8e42cdba [FIX] web: parseMonetary of decimal value without leading 0
Steps to reproduce
==================

- Open a product form view
- Enter .5 in the Cost field

It is parsed as 5 but it should be 0.5

Cause of the issue
==================

When trying to strip the currency symbol from the input, the leading
decimal separator was also removed

Solution
========

The decimalPoint can have multiple characters.
This means that we can't simply add the decimal separator inside the negated
character class.

Instead, what we can do is skip everything until we find a interesting
substring. (more details in the comment)

We then remove everything that is not a digit at the end.

Finally, we can pass that to `parseFloat`

closes odoo/odoo#123358

X-original-commit: fa466d75da3b30ac1e512a95436075ef1461a95c
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-06-02 12:04:13 +02:00
Elisabeth Dickinson c84d388fac [FIX] *: switch image's .rounded-circle to `.rounded
*: gamification, hr, hr_contract, hr_expense, hr_holidays, hr_org_chart,
lunch, mail, web

Since the Milk refactoring, the backend uses only `.rounded` avatar
images. The `.rounded-circle` classes on images have been replaced by
`.rounded`.

task-3336569
part of task-3326263

closes odoo/odoo#123286

X-original-commit: b492049788353274fb32bb6fbe4d40e97a184a87
Related: odoo/enterprise#41798
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-01 17:55:25 +02:00
abd-msyukyu-odoo 9da144788f [FIX] web: consider overflow visible dimensions for draggable
In a Kanban View, the container in which elements are dragged is a `d-flex`
element, and as such it has the `overflow: visible` css property by default.
This means that if there are more groups than the current dimensions of the
viewport allows for, those groups will overflow outside the dimensions of the
container, preventing elements from being dragged outside.

Therefore the dimensions of the draggable area should consider the container
`scrollWidth` and `scrollHeight`, as these values take into account the
dimension of overflowing elements.

task-3339978

closes odoo/odoo#123167

X-original-commit: b14f195a426183894dcd37d9776807114e8e05ef
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Abeloos Damien (abd) <abd@odoo.com>
2023-06-01 11:44:00 +02:00
Adrien Minne (adrm) cde7d9edb0 [FIX] web: strftimeToLuxonFormat escape character
The function `strftimeToLuxonFormat` used brackets as escape character,
which was the escape character of moment.

This commit changes the escape character to be quotes, which is the
correct escape character for luxon.

https://moment.github.io/luxon/#/formatting?id=escaping

closes odoo/odoo#123192

X-original-commit: d69201a6fe78dc22baed1cede04092aa2ed0bf0b
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-06-01 10:25:33 +02:00
Julien Carion (juca)andVincent Larcin 52b483e6f8 [FIX] project,web: fix readonly in list view cells
This commit changes how automatic readonly props are applied to list
fields so that it doesn't override the getFieldProps method

It also fixes the method 'getCellReadonly' in ProjectTaskListRenderer,
which was renamed to 'isCellReadonly' in the framework but not in the custom renderer.

Task-3340379

closes odoo/odoo#123026

X-original-commit: da3b2421b3f851629d5d287223b7ef581a30a5ab
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Larcin Vincent (vila) <vila@odoo.com>
Co-authored-by: Vincent Larcin <vila@odoo.com>
2023-05-31 13:08:26 +02:00
Romain Estievenart 91af1abbd5 [FIX] web: searchbar in listview takes focus after unselected all items
Steps to reproduce:

1. Open the "project" app
2. Switch to the list view
3. Select "All items"
4. Unselect "All items"
5. The focus searchbar is now focused => bug

The searchbar is autofocused (each time it enters into the dom). Unlike
before, in lists, it is removed when there are selected records, and
comes back when there's no selection anymore. As a consequence, it takes
back the focus. It should only take the focus on a first load, not every
time the searchbar re-appears

Task ID: 3336233

closes odoo/odoo#123025

X-original-commit: 15aacceb401a6868b694870693e7679677be80a0
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-31 13:08:24 +02:00
Chrysanthe (chgo) f29e804c83 [FIX] web: reintroduce .bg-transparent class
== ISSUE ==

With the refactoring of the `utilities_custom.scss` file, we moved our
custom `bg-*` classes to the `bootstrap_review_backend.scss` file.

While doing this, the `bg-transparent` class actually disappeared.
This commit aims to reintroduce the class in the backend.

== After this commit ==

We reintroduce the `.bg-transparent` class inside
the `bootstrap_review_backend` file. We adopt the default Bootstrap
behavior for `background` classes and use a CSS variable to handle the
opacity.

task-3326297
part of task-3326263

closes odoo/odoo#122995

X-original-commit: 49c0848c4780948d037bbe49aea86dfd0afa27a5
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-31 09:23:24 +02:00
Chrysanthe (chgo) 5754d06104 [FIX] hr_expense, web: fix CP buttons spacing
=== ISSUE ===

If you open the `Expenses` module, the buttons placed on the left inside
the Control Panel have a custom margin. One of them has a `.mx-1` and
another one has a custom `.gap` defined in the SCSS files.

=== AFTER ===

We remove the `.mx-1` class to replace it with a `.me-1` class, which
is used across Control Panels to space buttons.

We also fix a global issue with the `.o_list_buttons` inside a
`.o_list_view` class, which was adding a gap defined in CSS. Since this
gap is added on top of our `.me-1`, this was generating a higher value
than expected for the margin.

task-3330141
part of task-332626

closes odoo/odoo#122986

X-original-commit: a1d697cc32ef4f94a4a7a89c3b442f58ddb8ecea
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-31 09:23:21 +02:00
FrancoisGe 7c3a3c6b70 [FIX] web: multi sources definitions in kanban
Before this commit, in a kanban view with a properties field, if the
records have multiple sources for their properties then the view crashes.

Why?
The kanban record tries to make properties accessible from record in the
kanban card. This is not useful, we don't want to be able to do "record.properties.hd32ndls".

Solution:
Properties must not be accessible from records in the kanban card.

How do we reproduce?
    - Go to a kanban view with a properties field
    - Have a record with property A of type integer and another record which
    has no property

Before the commit:
The view crashes because we're trying to format the value of the second
record for property A, which it doesn't know.

After the commit:
The view is displayed correctly.

closes odoo/odoo#122833

X-original-commit: 735f34f29150ab1782f68d77c993dbe3227f998b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
2023-05-30 13:03:45 +02:00
Alexandre Kühn 6ead25b236 [FIX] web: make disabled date visible in dark theme
Before this commit, calendar view in dark theme did not visually
show the disabled date, such as weekends.

In white theme it's fine because bg-view is white, so gray-200 on
white is visible. In dark theme, however, bg-view is identical to
gray-200, so it's not visible.

This commit fixes the issue specifically in dark theme by showing
disabled dates with gray-300.

closes odoo/odoo#122753

X-original-commit: 968b4a284acab3f67f192f1029abbbd1edb2b442
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-30 13:03:36 +02:00
Xavier Luyckx (xlu) 0b6caafb7e [FIX] web: pivotView empty header cell background, adapt for milk
Adjust pivot view to match new web client redesign: Set top-left empty
header cell background-color to match view background (+ borders).

task-3329794
part of task-3326263

closes odoo/odoo#122750

X-original-commit: 34f001e119c873272f9c4c90b1128f02c8ef88d0
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-30 11:46:47 +02:00
luvi acfb1977c7 [IMP] web: Auto tab is displayed by default in signature dialog
This commit improves the behavior of the signature dialog. Now, we don't
force the display of the dialog to the draw tab after a click has been
made on a field with the signature widget. The dialog has already supported
the management of the default tab when no defaultName props is given.

A test has been adapted to test this new behavior. This test used the full_name
attribute to verify the presence of the 'Auto' button. Now, this button is
selected by default.

task-3259468

closes odoo/odoo#122600

Signed-off-by: Georis François (fge) <fge@odoo.com>
2023-05-26 13:15:53 +02:00
Julien Mougenot 7d1b8e5187 [IMP] web: Enhance date selection highlights
This commit introduces better visual indicators in the datetime picker
to highlight the previous selected value(s) and the new one(s).

closes odoo/odoo#122564

X-original-commit: 0fb302e748ffbdc3b8ee79bc6f1be62e8f11a2aa
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-05-26 11:40:46 +02:00
Julien Mougenot 9d8c93ee67 [FIX] web: Open datetime picker on click
Before this commit, the datetime picker would open on date/datetime/
daterange fields when their input was focused.

The intended behavior was for the picker to open on click instead. This
commit does that, as well as re-positionning the picker when switching
between single date and range values.

Task 3323594

X-original-commit: 39443638de8b50263b07d82b2d34aeb62c5ebb5b
Part-of: odoo/odoo#122564
2023-05-26 11:40:46 +02:00
Julien Mougenot a563edc696 [REM] web: Remove local fast date comparison in date utils
This commit removes a function from the `@web/core/l10n/dates` file
which was designed to save some time when comparing 2 dates.

The existence of this function was justified by the fact that Luxon
would allegedly perform expensive and needless transformations to
convert a date to a number (which is the case when comparing date
objects).

However it appeared that it was a mistake on my part, as I actually
inspected the wrong class method: I checked the `valueOf` implementation
of the `Duration` class, not the `DateTime` class.

X-original-commit: 995a1ab49bdd9e63b4f1027bbd723037c5045d21
Part-of: odoo/odoo#122564
2023-05-26 11:40:46 +02:00
Julien Mougenot ddc98a8cd8 [REM] web: Remove keynav from datetime picker
Removed the keyboard navigation in the datetime picker since it was
poorly designed and less useful than directly type the date in the input.

X-original-commit: 029334a305ddfa645244b67d4228861ca867d8ee
Part-of: odoo/odoo#122564
2023-05-26 11:40:45 +02:00
Julien Mougenot 772e7367fd [FIX] web,*: Set dropdown button tags to span
This commit changes the arrow icon tags of autocomplete dropdowns to be
spans instead of an anchors.

This is because these elements are inert icons without href or handlers
attached, and they tricked the list keyboard navigation into considering
them as valid focusable elements.

X-original-commit: d253e41c44accd43cbd6478717e3978772076974
Part-of: odoo/odoo#122564
2023-05-26 11:40:45 +02:00
Pierre Masereel 40fdc32c2e [FIX] web: unescapeHTML doesn't match old _.unescape
Since we've created unescapeHTML to replace the _.unescape function. The
issue is that _.unescape was using the hex code '&#x27," for the
character " ' ". And the new function uses the decimal code '&#39;', but
as there are some old domains for dashboard have ben stored escaped with
'&#x27', we are now unable to unescape them.

closes odoo/odoo#122457

X-original-commit: 1516b52cc7266e4cb2afed2941d93f2f9bc21bb9
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Masereel Pierre <pim@odoo.com>
2023-05-25 19:16:21 +02:00
Habib (ayh) 655e1ea63c [IMP] web: stop autocomplete click event
The analytic_distribution component used an extension of the AutoComplete component for 2 reasons.
1. to get access to the focus event
2. to stop propogation of the autocomplete input click (which prevented the analytic popup from functioning well)

The need for the focus event was removed, and it doesn't make sense to maintain an extension to simply stop event propogation. For this reason, the extension was removed, and the `.stop` is added directly to the AutoComplete

Part of task-3180055

closes odoo/odoo#122424

X-original-commit: ebee32b8aa994bfd3fd375f6deb10676356a5d4a
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
2023-05-25 11:07:22 +02:00
Mahdi Cheikh Rouhou (macr) 3267f4b46e [FIX] web : align number on right in rtl lang
Numbers should be alinged on the right in rtl langauge same as ltr langs

Steps to reproduce the isse :
1- Change the language to arabic
2- To to the list of invoices in accounting and you can see that the numbers are aligned to the left

The origin of the problem is that rtlcss reverse the alignment from right to left

opw-3295573

closes odoo/odoo#122196

X-original-commit: 180139cd9244b6d6c7fc3b22e37d691215790359
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-05-24 13:10:43 +02:00