Commit Graph
14787 Commits
Author SHA1 Message Date
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
Aaron Bohy 0fdff8200e [FIX] web: tests: fix tests failing locally
The adapted tests passed on runbot but failed (at least) on chrome
113.

closes odoo/odoo#123097

X-original-commit: ac1a158b5f6c04f94573a2fb6c7c94d9506e39aa
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-31 17:26:19 +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
Michele 724df8a570 [IMP] core: new neutralize flag on database restore and database duplicate dialog
Before this PR:
The only way to neutralize the database is running cli command neutralize

After this PR:
There is a new checkbox "neutralize database" in Duplicate database and Restore database dialog that neutralize the database after duplication/restore.
I also moved the neutralization code to the external module so it can be called also outside the cli .

closes odoo/odoo#122185

X-original-commit: 616740e9d09b3d0376be43ed1489e390f6f5823e
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-05-24 11:53:38 +02:00
abd-msyukyu-odoo 2753d07b50 [FIX] web: rework draggable_hook scrolling
In Knowledge, the scrollParent for the `Y` axis of an embedded ungrouped Kanban
view is the article body, which contains the draggable `container` (which is
itself contained in the scrollParent for the `X` axis).

This commit introduce 2 fixes related to the `draggable_hook_builder`:
- In `draggable_hook_builder`, `updateRects` was modifying values of the
  `containerRect` from values of the `scrollParent`. Then, the `containerRect`
  was used in `handleEdgeScrolling` to compute a scroll value to apply on the
  `scrollParent`, and when updating the dragged element position, to compute the
  boundaries for the dragged element. This commit stores values for
  `scrollParent` in `scrollParentRect` alongside the modified `containerRect`.
  `scrollParentRect` will be used to compute the scroll value based only on the
  dimensions of the scrollParent, and the modified `containerRect` will be used
  to compute the boundaries.
- The `scrollParent` in the `X` axis can be different from the `scrollParent` in
  the `Y` axis. This commit stores both of them individually so that one is not
  neglected when higher in the DOM than the other.

Task-3291771

closes odoo/odoo#122211

X-original-commit: 1f784652f9431c8716329f284133df215656c4b9
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Abeloos Damien (abd) <abd@odoo.com>
2023-05-24 09:49:13 +02:00
Romain Estievenart 0ff71ab65f [FIX] web: crash in grouped kanban's progressbar with folded column
Steps to reproduce:

- Open Odoo on small screen
- Go to "Project" app
- Select project > Traceback

The Kanban progress bar's refactoring [1] didn't completely took into
account the fact that, on smaller screen, the "folded" columns aren't
actually folded (like on dekstop-like screen sizes) but instead their
records aren't loaded by default. As a result, in one case the progress
bar is shown (small screen) and in the other hidden.

As the progressbar's information is memoized in `getGroupInfo`, this
getter should have been called wherever those information are read.

This commit fixes the issue by properly calling the `getGroupInfo`
getter instead of using the "private" `_groupsInfo` object (which may
not yet have been populated, due to the memoization).

task-3336233

[1] https://github.com/odoo/odoo/commit/58ca40b03215ef4c6c575267494dc8bccc30a033

closes odoo/odoo#122214

X-original-commit: c2efa7f059c92298ae5fb22b83e812453e2eb8ea
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-24 06:29:41 +02:00
Damien Bouvy ae6e5be25a [FIX] web: add description to search panel toggle hotkey
closes odoo/odoo#122111

X-original-commit: d21ceebf93e73fe57c6e6c6a803241cd6717ce0b
Related: odoo/enterprise#41355
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-23 22:32:46 +02:00
Damien Bouvy 3bbfad3a47 [FIX] web: fix an issue where an empty button box is displayed as 'null'
If the button box exists but contains nothing (or nothing visible), it
will be displayed as the string 'null' in the control panel

This commit changes this behaviour to show nothing and remove the
culprit view (an invisible button should simply not be there)

X-original-commit: 0089b302bf30efb324c80f74f058d6d64f686e4c
Part-of: odoo/odoo#122111
2023-05-23 22:32:46 +02:00
Damien Bouvy 4bff0c04bb [IMP] web: remove hover effect on list columns
The hover effect is rather strong and has low usefulness (the "chevron"
icon still appears) and can interfere with the current "sorting column"
decoration. We can safely remove it.

X-original-commit: f70fcbc8d1971c68546242c59caaae7f8481acf2
Part-of: odoo/odoo#122111
2023-05-23 22:32:44 +02:00
Damien Bouvy 9d2d9cc504 [IMP] web: remove tooltips on x2many fields in list
These tooltips contain very little information ("0 record", "2 records",
etc.) but their content usually have their own tooltips or title
attributes that interfere with this tooltip.

Remove them completely.

X-original-commit: 226829653495294044c2b88008e89a9cd2edffac
Part-of: odoo/odoo#122111
2023-05-23 22:32:44 +02:00
Damien Bouvy e9e1eb6e92 [FIX] web: missing kanban column title on mobile
X-original-commit: c3ff92dabb6ba479876c91e0f19cd94cf5830510
Part-of: odoo/odoo#122111
2023-05-23 22:32:44 +02:00
Jorge Pinna Puissant 135643f62c [FIX] web: remove unused code in kanban progress bar
This commit removes  a non-used, and non-tested method that was
mistakenly left on the progress bar hook.

closes odoo/odoo#122112

X-original-commit: 04c105fa244ea0a335023393e560153d669a7f2e
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-05-23 18:02:15 +02:00
Audric Onockx (auon) 6feb1ff1f2 [REF] web: adapt uncorrect onchange test
In previous commit (https://github.com/odoo/odoo/pull/119214),
this line was added to make the block onchange and check
if the view was rerendered correctly,
but having `await nextTick()` inside an RPC doesn't make sense.
So we use `makeDeferrer()` which is the tool provided for that matter.

closes odoo/odoo#122110

X-original-commit: a1056b1299f1edae736ea1ac00b6895e1c758104
Signed-off-by: Georis François (fge) <fge@odoo.com>
2023-05-23 18:02:12 +02:00
Viktors Lipskis (vili) 80fabba75e [FIX] web: remove whitespace below report iframe
This commit removes whitespace below iframes in reports, which also caused an
unnecessary vertical scrollbar to appear.

task-3334745

closes odoo/odoo#122052

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-05-23 16:32:16 +02:00
FrancoisGe ddf67f83be [FIX] *: tests: utility to mock RPCError
In this commit we add the makeServerError utility which allows you
to easily create a valid RPCError in the tests.

We have added this utility to prevent the use of invalid or incomplete
errors. We will give default values for all the parameters needed for
a valid RPCError.

For example, in some tests, we only check the presence of an error
dialog and not the expected one. So there was a set of tests that were
green because the failure was in the RPCError handling. So we had an
error dialog but it was not the right one. In general, the crash occurred
because the RPCError contained no data.

closes odoo/odoo#121932

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-05-23 16:32:04 +02:00
Antoine Guenet 995bf2d883 [REF] web, mail: rename attachment_viewer to file_viewer
Since the attachement viewer was moved to core, this renames it to file
viewer to decouple it from the Attachment model/concept from the mail
module.

Part-of: odoo/odoo#119625
2023-05-23 16:31:21 +02:00
Antoine Guenet 8aec394f71 [MOV] mail, mrp, mail, web: move attachment_viewer from mail to web
The `mail` module's `attachment_viewer` is useful for more than `mail`
alone. In order to be able to use it in the `web_editor` module (which
doesn't depend on `mail`), we move it to the `web` module.

task-3109331

Part-of: odoo/odoo#119625
2023-05-23 16:31:21 +02:00
Adrien Dieudonné fdf4cbf600 [FIX] web, *: x2many list horizontal overflow
This issue only occurs on Firefox because ´has´ is not supported
and the following rule is not applied:
https://github.com/odoo/odoo/commit/2cd0106e63785dd34553c2b4747d72b93b9a7afd

Anyway, there is an existing css rule that is applied if the field
class is correclty added.

Steps to reproduce:
- Open Sale
- Add some content in the sale order line

opw-3201461
opw-3285854
opw-3266130
opw-3244581

closes odoo/odoo#121979

X-original-commit: add1df806157c074fd1a3224d1d8bdf1922481fb
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-23 08:42:12 +02:00
Brieuc-brd a5d2cb5bcb [FIX] web: color of tooltip arrow
Prior to this commit, the color of the tooltip arrow didn't match the
popover background when it was a tooltip (white arrow and black popover
content).

However, the css adaptation was already present in `tooltip.scss` using
the css variable `--popover-arrow-color`, but the selector wasn't
correct since the arrow was always BEFORE the content.

This commit fixes the issue by placing the arrow after the popover
content.

task-3329927
Part of task-3326263

closes odoo/odoo#121975

X-original-commit: 0f1fb80ac6e36b8230ffaf3c7c2608d527b451a2
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-23 08:42:07 +02:00
Lucas Perais 10a6387242 [FIX] web: aceField with a value of false
Have a record with a field displayed with the aceField.
That field should have a value of false (ie: unset).
Display that record on a form view.

With the pager, go on to the next record.

Before this commit, a write was triggered because the aceField considered itself as changed
even though we did not do anything.
This was because the value of false was compared to the ace value (empty string) when leaving the record.
Being different, this triggered the current record to be updated and saved.

After this commit, a false value is locally transformed to the empty string when checking if the field has
some changes. Hence, there is no write triggered.

opw-3326914

closes odoo/odoo#121969

X-original-commit: 74e8d60a6ae19199ae5d0f9d66ca0748f068782f
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-05-23 07:40:50 +02:00
Hamza (hisl) ab5ba554b0 [FIX] web : change the white space of button-box to nowrap
Steps to reproduce the issue:

1. Go to any of the contacts with partner ledger option.
2. Make the browser window small and observe the text in the partner ledger button box.

Current Behaviour:
The text in the button box does not get ellipsized, rather stays the same and may get out of the button box if the box becomes smaller

Desired Behaviour:
The text in the button should be ellipsized

OPW-3266235

closes odoo/odoo#121167

X-original-commit: ec642f9caba7c6a7a21d9e65ffa0e305ff06678d
Related: odoo/enterprise#40948
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-22 16:30:06 +02:00
MerlinGuillaume 7fba2423c6 [FIX] web: open a notification when fields are invalid in a dialog
There is no notification telling which field are invalid when we try to
save a form in a dialog

Steps to reproduce:
1. Install Survey
2. Go to Survey and open any survey
3. Add a question in the survey and try to save it (without entering a
   title)
4. There is no notification. Although the invalid field is highlighted
   in red, it could be tricky to see it if the field is in a tab

Solution:
Create a method in Record that sends the notification and call it when
the record is not valid in X2ManyFieldDialog

opw-3196166

closes odoo/odoo#121705

X-original-commit: 58f89915c0ad447f0c5896739219f0812cfd4a6a
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-05-22 08:21:19 +02:00
std-odoo 647a5d7449 [IMP] web: never select the white color for properties tags
Purpose
=======
Never select the white color for the properties tags, it should be
selected manually, because usually the white color is used to not show
a tag in the kanban view (and that color is never automatically
selected for normal many2many_tags widget).

Fix the alignment of the property label.

Task-3208449

closes odoo/odoo#114200

Related: odoo/enterprise#38944
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-17 13:37:38 +02:00