Commit Graph
17406 Commits
Author SHA1 Message Date
Antoine (anso) b9e1de0030 [FIX] web: fix o_x2m_control_panel's bottom margin
This commit sets the bottom margin of `.o_x2m_control_panel` at the
positive amount of the negative top margin of `.o_list_renderer` so
that the `.o_cp_pager` buttons are not cropped

task-3422214
part of task-3326263

closes odoo/odoo#129128

X-original-commit: 0e40d65382c37ad594aae351435f5bea14903cd6
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-20 14:23:20 +02:00
Leonardo Pavan Rocha d5ba147d0b [IMP] web: enable JS tooling for sign_itsme
This commit enables the JS tooling for the sign_itsme module, as well as it
removes a rule in the eslintignore file that is not valid anymore since the
static/src/js folder does not exist anymore in sign.

task-3286974

closes odoo/odoo#126296

Related: odoo/enterprise#43103
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-07-20 11:49:17 +02:00
Leonardo Pavan Rocha c4994c7d10 [IMP] web: changes in name and signature for sign
This commit adapts the NameAndSignature component to allow usage in the sign
module by enabling customization of behavior when "auto" and "load" buttons are
clicked. It also replaces the top buttons for fa icons for a cleaner UI and
adds autofocus to the name input field.

task-3286974

Part-of: odoo/odoo#126296
2023-07-20 11:49:17 +02:00
william-andre 0eff29409d [IMP] web: manage hierarchy in company selector
In order to manage different branches, the usability of the company
selector is being improved
* display in a hierarchic manner
* when selecting a company, select all the available children with it

task-3371677

Part-of: odoo/odoo#125642
2023-07-20 11:49:05 +02:00
william-andre 0d30cc2bc9 [IMP] models: manage sub companies with check_company
Allow some models to be delegated to the main company of the object.
For instance:
* Have company Parent and Child
* Child has access to all the accounts of Parent
* When creating a document in Child using an account of Parent, there
  shouldn't be a consistency error.

In order to do that, a new method `_check_company_domain` has been added.
This method is used when `check_company=True` is set on the field
declaration to:
* filter relational fields in the UI [^1]
* validate relational fields when writing on them in `create` and `write`

That method should also be used in the business code for models likely
to be shared amongst company branches instead of hardcoding the domain
based on `company_id`.
The same applies on domain restriction on the field declaration: the
flag `check_company` should be prefered instead of providing the domain
explicitly based on `company_id`.

Since a lot of validation and filtering will now be done based on
`parent_of`/`child_of` of the company, some support has been added for
that special case in `filtered_domain` in order to avoid doing
additional queries.

task-3371677

[^1]: because of that change, support has been added on the python
interpreter of the client to allow concatenatng domains.

Part-of: odoo/odoo#125642
2023-07-20 11:49:05 +02:00
Vivek Pathak b783718ad1 [FIX] web: prevent overlap of popovers on property field deletion
Before this commit:
Previously, when the property field was deleted, a confirmation dialog box would
open. However, this resulted in an issue where both the property field dialog
box and the confirmation dialog box overlap.

After this commit:
With this fix, when a property field is deleted, the property field dialog box
now closes before the confirmation dialog box opens. This ensures that there is
no visual overlap between the two dialog boxes.

Task-3371734

closes odoo/odoo#129080

X-original-commit: 971826ab02e7e4134e73c498d85867a74088eaf9
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-07-20 10:07:29 +02:00
Vivek Pathak 2c843fcb09 [REV] web: prevent error on multiple property field deletions
This commit reverts the changes from PR https://github.com/odoo/odoo/pull/126457.
The previous changes aimed to fix the error that occurred when deleting the
property field multiple times.
However, the update behaviour now ensures that the property field popover closes
after a single click on delete icon.

Task-3371734

X-original-commit:https://github.com/odoo/odoo/commit/9dc7d596b07532aa021ee0ca0a2bcb3c2378caf1

X-original-commit: 9ae3e6e74b0fa52b392313510276b1cbfe5a2afd
Part-of: odoo/odoo#129080
2023-07-20 10:07:29 +02:00
Chrysanthe (chgo) 0c405014d2 [FIX] web: fix calendar and datetime picker layout
=== ISSUE 1 ===

The spacing between the navigation buttons in Calendar were managed
by a `gap-1` class. This worked but it was not consistent with
the navigation we have in project gantt view. In order to improve
the consistency of our  UI, we need to make this look the same.

=== ISSUE 2 ===

If you navigate to Time Off and request a new time off, the datetime
picker `apply` position is not correct. This is due to the fact that
no `state.timeValues` is visible to position it accordingly. That means
we need to specify two different layout depending if these buttons are
visible or not.

== AFTER ===

We remove the `gap-1` class and add a `btn-group` class instead,
which manage the spacing between children buttons.

We also change the navigation icons to `arrows` one and fix two issues
related to the datetime picker :

- The gap between month name isn't computed as it should ;
- There is an issue with the position of the `apply` button
when no `state.timeValues` is displayed.

task-3389679
part of task-3326263

closes odoo/odoo#128460

X-original-commit: c0b354e14a18667463451aa6fe768bffcbb9da9a
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-20 10:06:53 +02:00
paso-odoo 09063c8161 [FIX] web: prevent selection while record in edit mode from editable list view
If applied, this commit will solve the issue of the list view selection when
the record is not actually created but it can be selected and can able to
perform the action.

Steps to produce:
- Open Accounting > Configurations > Chart of Accounts.
- Click on the 'New' button.
- Select the new line which has been added.
- Perform the 'Duplicate' action for that record.

This commit will fix the generic issue by preventing the record selection while
the record is in 'Edit' mode.

sentry - 4191036697

closes odoo/odoo#129000

X-original-commit: 5570216c8c852b5851526217858b5b7515309444
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
2023-07-20 08:57:27 +02:00
luvi 563b6a8a39 [IMP] web: add isDisplayStandalone feature detection helper
This commit adds the isDisplayStandalone helper, allowing to detect whether
Odoo is running inside the Progressive Web App (in standalone mode) or not.

This feature detection is directly used in the linked enterprise

closes odoo/odoo#128969

Pr: https://github.com/odoo/enterprise/pull/43680.
Related: odoo/enterprise#43680
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-20 08:57:13 +02:00
Brieuc-brd 9efcdd707e [FIX] web: CP: long and clipped breadcrumb
=== ISSUE 1 ===

When the Control Panel breadcrumb was not displayed (eg. after reloading
the page), the name of the last element was used. In this case, the name
was not truncated and could create a layout issue if it was too long.

=== ISSUE 2 ===

The breadcrumb was clipped on Firefox, letters such as "p", "j" or "y"
where partially hidden. This was due to the combination of a too small
line-height and the `overflow: hidden` applied on `breadcrumb-item > a`.

This commit fixes these issues.

task-3420194
Part of task-3326263

closes odoo/odoo#128582

X-original-commit: abbbaee7bd591285cef98275da931fd8a8f073cd
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-20 05:02:49 +02:00
Antoine (anso) 200da4b7fa [FIX] web: arrow button's arrow color on hover
Prior this commit, `.o_arrow_button`'s arrow didn't have the same
transition as the button itself which created a glitch on hover

task-3419220
part of task-3326263

closes odoo/odoo#128581

X-original-commit: 81adc9a1769171a8f1c3e59e0841186904fc7ebd
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-20 03:56:39 +02:00
Julien Carion (juca) 6c412be2ea [IMP] *: coherent hotkey uses
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.

task-3370463

closes odoo/odoo#127469

Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:15 +02:00
Julien Carion (juca) 731db3d459 [IMP] web, mass_mailing: make domain field foldable
This commit allows the domain field to become foldable such that it will
display its domain in the form of facets (similar to the search bar's
ones) when it is folded. Also applies this functionality directly to the
mass_mailing form view.

task-3339512

closes odoo/odoo#126789

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:07 +02:00
Pierre Pulinckx (pipu) 8bfa76a842 [REF] *: Unify _t and _lt
The goal of this commit is to prepare ground to remove
lazytranslate function _lt() and keep only _t()
for a better understanding of the use of the translation function.

In this commit,

the translate function _t() has been updated to return the translation
if they are loaded. If not, it throws an error.
the lazytranslate function _lt() returns _t() function.
Corollaries :
Steps in test tours are now a function that returns an array of steps
to avoid any interpolation of _t in this ones before translations has
been loaded.

Example :

registry.category("web_tour.tours").add("example", {
    test: true,
    steps: () => [
        {...},
        {...},
    ],
});

task-3292454

closes odoo/odoo#124157

Related: odoo/enterprise#43153
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-07-19 13:13:16 +02:00
Mathieu Duckerts-Antoine 4e70ca384d [FIX] web: domain selector dialog: validate domain on confirm
With ab4f45b, the domain validation done
on confirmation in the domain selector dialog was removed. Now that we
have a new route /web/domain/validate (see previous commit) that allows
us to quickly check the validity of a domain, we can reintroduce the
validation.

closes odoo/odoo#128913

X-original-commit: fa7788fac3c48e95dcbe78abb66ac5c284d27c56
Related: odoo/enterprise#44291
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 11:40:10 +02:00
Mathieu Duckerts-AntoineandOliver Dony afdb546e44 [FIX] web: domain field: quick save after debug edit
When a domain field value is edited via the debug textarea, no
search_count is done for performance reasons. A single exception is done
when saving the record. Then we check the validity of the domain created
in the debug textarea in order to avoid to save an invalid domain in db
(and get tracebacks,..). The problem is that a search_count can take a
very long time to be executed if the domain is valid. Here we introduce
a route /web/domain/validate in order to quickly check the validity of a
domain and use it in domain field in order to fix the above mentionned
performance issue. Note that the search_count is still done if it useful
but does not have to be waited anymore.

X-original-commit: 40288221c39ff8fba41cd6ac231ab33600dc0cd4
Part-of: odoo/odoo#128913
Co-authored-by: Oliver Dony <odo@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-07-19 11:40:09 +02:00
Nicolas Bayet d7245d2abf [REF] web_editor,*: convert wysiwyg to owl
The goal of this commit is to remove all dependency to legacy in the
wysiwyg because the wysiwyg has to be loaded on a lot of form view
(through the html_field).

To remove the dependencies, all the legacy widget that the wysiwyg
uses had to be converted to owl. In order to finish the PR faster,
only a partial conversion of the widgets is done, changing only the
part of the code that was necessary for it to work instead of
rewriting the whole widget from scratch. Another pass should be done
to convert all those widgets to fully embrace the owl paradigm.

task-3175256

Part-of: odoo/odoo#118966
2023-07-19 11:39:44 +02:00
Nicolas Bayet cb4c2091b6 [REF] web: move colorpicker.xml
Part-of: odoo/odoo#118966
2023-07-19 11:39:44 +02:00
Nicolas Bayet 230a9429bb [REF] web: finish split of colorpicker.js
Part-of: odoo/odoo#118966
2023-07-19 11:39:43 +02:00
Nicolas Bayet 82ae32665c [REF] web: move history of colorpicker.js to split the file
Part-of: odoo/odoo#118966
2023-07-19 11:39:43 +02:00
Adrien Schoffeniels 91ee8d15fb [FIX] web: make avatar of m2o properties smaller in kanbans
Purpose:
--------
This commit makes the the avatars shown in many2one properties in kanban
cards smaller, as they were abnormally big.

Task-342200

closes odoo/odoo#128912

X-original-commit: 9ae4be80c68faafd7a09ea3cbeaf45e9b8eeaa71
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-07-18 19:28:23 +02:00
Raphael Collet 96a98f4f4c [FIX] web: web_read() on new records with _inherits
This commit partly reverts 59afbf6686 and
provides an alternative solution.  In this solution, records.web_read()
returns a list of dicts where the key 'id' corresponds to each record.id
in records, which enables to reliably relate each record to its values.

This also fixes the implementation of web_read() on new records where
the fields contain a reference field with some context.

closes odoo/odoo#128878

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-07-18 19:28:13 +02:00
miad-odoo eabc74b6fd [IMP] mail: add new field StatusBarDurationField
This commit implements a new widget in mail, `StatusBarDurationField`. Purpose:
seeing how long a record has spent in each stage in a form view.

It is implemented for records with a `many2one` status field and gets the data
from the `duration_tracking` field of the record. `duration_tracking` is computed
by adding the `mail.tracking.duration.mixin` to a model.

Time is shown using a luxon Duration object. "narrow" specifies that time is
expressed with one character and luxon takes care of translations.

Task-3032773

Part-of: odoo/odoo#108554
2023-07-18 13:07:41 +02:00
Xavier-Do 595aa24843 [IMP] registry: multiple ormcache
One of the main issue with ormcache is that the invalidation clears
everything, meaning that some value, slow to compute but with a long
lifetime, can be removed from the cache because an easy to invalidate
value is cleared, like after writting or creating a product has an
example.

Most example in the code will try to invalidate the cache of the models
doing something like `env['ir.qweb'].clear_caches()` but it is
finally equivalent to `env.registry.clear_cache()`, and cross worker.

The idea is to have multiple cache, maybe with specific sizes for a
specific purpose.

Having one per model is maybe a bad idea because it will be difficult
to size the LRU correcly, and it is too dynamic. Checking invalidation
may be expensive.

The proposed solution is closed allow a limited number of named caches,
using onse sequence per cache. This is actually close to the
cache_longterm.

We want to discourage using a specific cache for one use case in
the buisness code. Adding a cache shouldn't be something easy, doable
in stable.

Note that we could also change the invalisation mecanism using an
insert only table. We an check the sequence of this table, but also
fetch all invalidation messages.
Another possible improvement, especially if we have more than x cache is
to have a global sequence, checking signaling would mean to check the
main sequence, and only the other ones if the main one changed.

Note that this poc is inspired from the long term cache but not all
use case where applie yet.

Part-of: odoo/odoo#119813
2023-07-18 11:42:26 +02:00
Julien Mougenot 8ce99b1eb1 [FIX] web: display daterange separator in readonly
Before this commit, a forward-ported fix regarding the display of the
arrow separator in daterange fields has been incorrectly adapted to fit
conflicting changes, and the separator does not appear in readonly with
both date values set.

This commit fixes that by restoring the proper conditions.

closes odoo/odoo#128509

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-07-18 10:19:53 +02:00
Samuel Degueldre 2d42501a5b [FIX] mail, web: fix memory leak in QUnit test suite
With the discuss refactoring, two memory leaks were introduced:
- the activity service opens a broadcast channel for cross-tab
communication.  Because services have no destruction mechanism, the
broadcast channel is never closed, and since most tests create their own
test environment with services, each test would leak an instance of the
activity service as it is captured by the bound onmessage function. The
activity service holds a reference to the mail store which results in a
large leak
- the RelativeTime component creates a timeout so that it can update its
time every minute or every hour depending on how old the message is,
this timeout is cleared when the component is destroyed. This component
tries to initialize the value of its timeout to `null`, but it does so
*after* calling the method that actually sets the timeout, causing the
timeout to be overriden with null and never cleared

The BroadcastChannel problem has been solved by adding BroadcastChannel
to the browser object, and patching it in the test setup code of web, as
it's a generic problem with BroadcastChannels. The timeout problem has
been fixed by simply reordering the lines so that we don't override the
timeout and it gets correctly cleared when the component is destroyed.

closes odoo/odoo#128768

X-original-commit: bd25f14d7a746fe48e09edea7ebb4aaa4634fbdc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-17 19:26:05 +02:00
mano-odoo 3df4eaff92 [FIX] *: minor settings spacing issues
The purpose of this commit is to review the responsiveness and spacing
of some settings that were visually broken.

The nested checkboxes were growing too much on smaller screens
making the content overflow.

This commit adapts these checkboxes settings to make them more readable
and consistent.

It also review the input that overflow similarly to nested checkboxes
such as the count of extra hours in attendances settings.

In 16.2 some SCSS was added to control field widget spacing on mobile,
however it was breaking the layout for the `.o_boolean_fields`.

Task-3113372

closes odoo/odoo#126347

X-original-commit: 80aa03e86bd47e6349a5fa69397857fdf6a8cc0b
Related: odoo/enterprise#43142
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-07-17 19:26:03 +02:00
Nasreddin Boulif (bon) 189017d10c [FIX] web: allow exporting record with properties when grouped
Steps to reproduce:

  - Install `CRM` for test purpose
  - Go to `CRM > Pipeline` and open any lead
  - Add a new property and set a value
  - Go back and open list view
  - Group by `Salesperson`
  - Select all records and click on `Export` in action menu
  - Add 'Properties' field
  - Export

Issue:

  Traceback raised. No issue if not grouped.

Cause:

  The properties value is a list of dict. When grouped, the properties
  value is not converted to string (like it is done for list and tuples
  in the non-grouped flow).

Solution:

  Move the code that convert list and tuples to string in the
  non-grouped flow directly to the `write_cell` method so that it is
  applied in both cases.

opw-3338564

closes odoo/odoo#128682

X-original-commit: f380c56bb13773eee0e19462ba7283b04d54183b
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-07-17 12:06:33 +02:00
niyasraphy 711024339f [FIX] web: field check/uncheck on clicking on neutralize label
before this commit, in the database manager page, on
clicking the Neutralize label in the db duplicate
and restore page is not check/uncheck the neutralize
checkbox.

after this commit, on clicking the label Neutralize
the field can be checked and unchecked as other field
in the same form.

closes odoo/odoo#128671

X-original-commit: 64e3d52591db49a4a441f170e216f0e3aca4fa23
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-07-17 10:40:44 +02:00
Benoit Socias 388e4bb2bf [IMP] website, web_editor: relayout theme options
This commit reorganizes the theme options to make them easier to find.
It also adds the following options:
- 'Font size' for each of the six headings
- 'Font (family)' for each of the six headings
- 'Margins' (top & bottom) for paragraph & the 6 headings
- 'Line Height' for paragraph & the 6 headings
- Harmonize buttons options with the custom button ones

task-3140991

Part-of: odoo/odoo#111621
2023-07-17 10:40:31 +02:00
Aaron Bohy e13f3103e2 [FIX] web: view compiler: honnor class attribute on widget
Commit [1] inadvertently broke the handling of the "class"
attribute on a <widget> node, in the view compilers. When set,
the value of the "class" attribute was given in props to the
Widget component as "name", instead of "className".

[1] https://github.com/odoo/odoo/commit/0b574df2599da3dae66b9785198420d707a280a3

closes odoo/odoo#128646

X-original-commit: 3024f2121848ec414d596ef9c3eb0a1bd7e6cfd2
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-17 09:21:18 +02:00
Antoine (anso) 4510559051 [FIX] web: avatar picture object fit
Prior this commit, non perfectly squared `.o_avatar` images were
not correctly fitted in the their boxes

task-3419159
part of task-3326263

closes odoo/odoo#128526

X-original-commit: cbe665eb2929a01e12714ae8e3fe66610780e7b9
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-15 12:00:36 +02:00
Antoine (anso) b9de651da4 [FIX] web: status bar buttons dropdown on mobile
On smaller screens, `.o_status_bar_buttons` are displayed in a dropdown.
This commits reset the styles of these buttons when they are displayed
in the dropdown, so they look like regular dropdown items

task-3414462
part of task-3326263

closes odoo/odoo#128462

X-original-commit: 071d92b3926f6a062ca3b0b0c9c70d8567bb6899
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-15 10:54:33 +02:00
Julien Carion (juca) 75481e2db0 [FIX] web: fix project calendar display name
This commit removes the displayName variable of the calendar controller
since it wasn't used anymore and the extension of the displayName is now
updated in the ProjectCalendarController instead. This fixes an issue in
project where the extension of the displayName in the project calendar
controller ( - Tasks by Deadline) would not be shown in the view.

opw-3410987

closes odoo/odoo#128461

X-original-commit: 120ab2513b487d0c117e5c67ed76e6d154d0243f
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-15 10:54:31 +02:00
Benoit Socias 4095539765 [IMP] base, web: upload a JPEG too when uploading a WEBP in backend
The library used to generate PDFs does not support the WEBP image
format. For those images to be included in reports, they need to be
converted. For security reasons, this conversion cannot be done on the
server, therefore it was decided to keep an already converted copy of
such images.

This commit converts uploaded WEBP images to JPEG and uploads them both
so that the report generation can use the JPEG instead.
This commit also pre-generates the resized version of images - and JPEG
versions of each of them.

task-2774352

Part-of: odoo/odoo#85494
2023-07-15 05:10:46 +02:00
Benoit Socias d1292a96a6 [IMP] base,*: support image/webp image format
*: mail, mrp, test_website, web, web_editor

Before this commit '.webp' images could not be used in odoo.

After this commit '.webp' images can be uploaded to odoo.
- can be used in image field
- can be used in HTML field image
- can be used in mails and website
- can be transformed (shape mask, filter effect, crop, rotate, resize,
  adjust quality)

task-2774352

Part-of: odoo/odoo#85494
2023-07-15 05:10:45 +02:00
Audric Onockx (auon) 09a90aa9ca [IMP] project,web: change groupby project label 'None' to 'Private'
Be consistent with the terminology used in all views,
'None' doesn't add value and makes the private task stage user-friendly.

Add filter "Private Tasks" to search private tasks easily.

task-3300649

Part-of: odoo/odoo#120668
2023-07-14 15:34:35 +02:00
Arthur Detroux (ard) 51b1808ebe [REF] web, *: make web.public.widget independent of web.Widget
*: im_livechat, website_event, website_event_track_live,
website_livechat

The goal of this commit is to ease the removal of web.Widget while
keeping web.public.widget.

The reason we want to keep the public widget is because it is not
currently possible to hook OWL components to existing DOM elements,
which is mostly what is done in the frontend.

To remove the inheritance, most of the code from web.Widget was
duplicated into web.public.widget.

This commit also adapts a few widgets which were using web.Widget as
frontend widgets.

However, there are still legacy widgets used both in the backend and the
frontend. Those were not adapted.

This commit adapts the following widgets:

- website_event: EventRegistrationForm
- website_event_track_live: WebsiteEventReplaySuggestion
- website_event_track_live: WebsiteEventTrackSuggestion

The modules that still use web.Widget but were not adapted can be listed
by using: `odoo.__DEBUG__.getDependents("web.Widget");`

Following this commit, any new frontend widgets should exclusively use
web.public.widget. They should have done so before, but in the near
future, widgets using web.Widget will no longer work.

task-3249625

closes odoo/odoo#117210

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-07-13 19:27:52 +02:00
Arthur Detroux (ard) afbbf75ec9 [MOV] web: moving the RootWidget definition after PublicWidget
In the next commit, the PublicWidget class will be made independent of
the legacy Widget class.

Therefore, the RootWidget cannot be defined before the PublicWidget as
it will extend the PublicWidget rather than the legacy Widget.

This commit moves its definition after the PublicWidget definition.

task-3249625

Part-of: odoo/odoo#117210
2023-07-13 19:27:52 +02:00
luvi 7c07a73b6c [FIX] web,*: properly format phone href
*: mail

This commit fixes the href used by the PhoneField. Following the
specs of a phone uri, spaces must be removed from the phone number
when using the href attribute.

A test has been added to verify that any spaces are removed from
a given phone number.

In mail, the SMS button href has been edited for the same purpose.

task-3371999

closes odoo/odoo#128383

X-original-commit: 9ff0270c8acf9596ebd404627c4f5b1a98b37c59
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-07-13 18:18:06 +02:00
Pierre Pulinckx (pipu) 504b4a7178 [REF] *:Replace moment usages with luxon
luxon and moment are both used in the solution, but
these two libraries facilitate the manipulation of dates.
It was decided to replace all uses of moment with
luxon so we can then remove moment.js from the
code and lighten the assets.

task-3391739

closes odoo/odoo#127406

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-13 14:47:41 +02:00
Mathieu Duckerts-Antoine 9c8c2a8c30 [FIX] web: model field selector: padding below path description
We make the elements of the path description be a bit above the bottom
line in the model field selector.

closes odoo/odoo#121688

Related: odoo/enterprise#41660
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-07-13 14:47:13 +02:00
Mathieu Duckerts-Antoine db67719fd6 [FIX] web: domain selector: bar below autocomplete
We add the class o_input to the root node of the DomainSelectorAutocomplete
component in order to get a line below the tags and the input value.

Part-of: odoo/odoo#121688
2023-07-13 14:47:13 +02:00
Mathieu Duckerts-Antoine fb9629cb6d [IMP] web: domain selector: autocompletion for relational fields
For the relational fields and the operators =,!=,in,not in, we allow
the user to use autocompletion as in a many2one or a x2many field.

Task ID: 3291990

Part-of: odoo/odoo#121688
2023-07-13 14:47:12 +02:00
Mathieu Duckerts-Antoine ff2ee462a5 [IMP] web: search bar: facet descriptions
We improve the facet descriptions of the domain created via the domain
selector. We do this in several ways like it was done for the readonly
mode of the domain selector:
    - instead of displaying ids for relational fields, we display the
      associated names.
    - instead of displaying values for selection fields, we display the
      associated labels.
    - quotes around strings are not displayed by default. They are if
      there is some ambiguity: the presence of a value of another type
      like 0, false or an expression makes necessary to put them.

Task ID: 3291990

Part-of: odoo/odoo#121688
2023-07-13 14:47:12 +02:00
Mathieu Duckerts-Antoine 56ede17854 [IMP] web: domain selector: display in readonly mode
We improve the readonly mode in several ways:

    - instead of displaying ids for relational fields, we display the
      associated names.
    - instead of displaying values for selection fields, we display the
      associated labels.
    - quotes around strings are not displayed by default. They are if
      there is some ambiguity: the presence of a value of another type
      like 0, false or an expression makes necessary to put them.

Task ID: 3291990

Part-of: odoo/odoo#121688
2023-07-13 14:47:12 +02:00
Mathieu Duckerts-Antoine e10f965c36 [FIX] web: domain selector: 'New rule' button size
The button "New rule" was too easily clickable since it took a whole
line. We reduce its size.

Part-of: odoo/odoo#121688
2023-07-13 14:47:12 +02:00
Mathieu Duckerts-Antoine a1365d7655 [IMP] web: model field selector: search on string and name in debug mode
We allow the user to make a fuzzy search on the string and the name of
the fields when the props isDebugMode is true.

Part-of: odoo/odoo#121688
2023-07-13 14:47:11 +02:00
Mathieu Duckerts-Antoine a3b00f2dca [FIX] web: domain selector: operators with same key
Before that commit, we could get two operators with the same key to
display at the same time. In that case, an error would be thrown by OWL:
Got duplicate key in t-foreach... . We fix that problem.

Part-of: odoo/odoo#121688
2023-07-13 14:47:11 +02:00