Commit Graph
3883 Commits
Author SHA1 Message Date
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
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
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
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
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
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
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 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 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
Adrien Schoffeniels 5511ffe03b [IMP] web: add onWillStart in calendar's model
This commit allows to define a `onWillStartModel` method in the calendar
controller that will be used as `onWillStart` option of the calendar
model.

Purpose:
--------
The related enterprise PR introduces a new "item calendar" feature in
Knowledge that allows to embed calendar views using article properties
to display these articles in the calendar.

To do so, one needs to modify the fields mapping before the model is
loaded for the first time, so that the records are fetched using the
properties in the search domain.
The `onWillStart` option of the `useModel` function is perfectly suited
for this.

Task-3239985

Part-of: odoo/odoo#121608
2023-07-13 14:46:59 +02:00
Mathieu Duckerts-Antoine bac8c7a5d6 [FIX] web: domain selector dialog: do not validate domain server side
Even with a limit of 1, the domain validation done in the domain selector
dialog at confirmation can be too costly (see PR message). Since we do
not have (yet) the tools to validate quickly domains server side, we
simply drop the validation server side.

closes odoo/odoo#127832

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-13 03:57:40 +02:00
Leonardo Pavan Rocha bc63d134eb [IMP] web: merge quick_add with quick_create_form_view_id
https://github.com/odoo/odoo/pull/114827 added a new attribute in the calendar
view that allowed passing a form view id that is used in the calendar module to
show a different form view when trying to quick create an event. This new
attribute, however, was only used in the calendar module. With this in mind, it
made sense to allow using this attribute in other modules. This commit
implements this, however, the approach used was different. It was decided to
merge quick_create_form_view_id with quick_add as both are related to the
same feature: quick creation of a record in the calendar view. Now, quick_add
receives either a boolean (original behavior) or a number representing the form
view id to be shown when quick creating a record.

task-3286969

closes odoo/odoo#122923

Related: odoo/documentation#4707
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-07-12 20:33:50 +02:00
Julien MougenotandXavier Bol 029dd9c567 [FIX] web: fix date fields appearance
Before this commit, in readonly daterange fields in list views, if one
of the dates was set, it was unclear which of the 2 fields it was (it
simply diplays the formatted value of the field which is set).

Now, the arrow icon appears on the right or left side to clearly reflect
whether the value is the start date or the end date (list views only).

closes odoo/odoo#127734

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Xavier Bol <xbo@odoo.com>
2023-07-12 16:53:10 +02:00
Julien Mougenot fd64757d82 [FIX] web: fix focus issues with datetime hook
Before this commit, the way focus was handled by the DateTime feature
hook was inconsistent. This caused the date/datetime/daterange fields to
not be able to open the picker when clicking on the "Add start/end date"
button, and effectively lose the value set on the field on save.

This commit introduces a more consistent focus handling as well as a
helper returned by the hook to open the picker on command.

Part-of: odoo/odoo#127734
2023-07-12 16:53:10 +02:00
FrancoisGe 42e5e247bf [FIX] web: m2o must only use the context of the field
From commit 2ecfed335d, clicking on the arrow of a m2o opens the
record in form view and passes it the context of the current view.
After this commit, only the context defined on the <field> is passed.

Problem:
An example of a problem, is the use of an incorrect active_id in the
second view that is passed through the first form view to the second.
Previously, the active_id of a form view was always the id of the record
and not that of the previous view. This behaviour is debatable, but it
leads to major changes. We therefore prefer to revert to the old behaviour
and no longer pass the entire context in order to avoid this problem.

How to reproduce:
- Go to a form view with a m2o
- Click on the arrow of the m2o

Before this commit:
    The view context contains all the context from the first form
    view and the second.

After this commit:
    The view context contains the context of the m2o field and the second view.

closes odoo/odoo#127538

Taskid: 3394945
X-original-commit: a9bec1fec3ff08461732ef2717457524339eb716
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-12 16:52:54 +02:00
Adrien Schoffeniels a52e2fdb80 [FIX] web: use right color class for calendar popovers
Purpose:
--------
Currently, the calendar common popover has an incorrect color class if
the value of the field used to color the records in the calendar is not
a number. Therefore the popover header remains grey although the event
is colored, and the header content is misaligned.

This commit fixes this behavior by using the `getColor` method to obtain
the class name to use in the popover, which is the method currently used
to obtain the class name to use in the event. If this method does not
return a number, the default color class (o_calendar_color_0) is used.

Task-3239985

closes odoo/odoo#128169

X-original-commit: b159a98e0f0c89fab91b706895bbc1884a8cbd4e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-12 09:14:54 +02:00
Lucas Perais 450f79c896 [FIX] web: actionService reports: pass action's context to download
Before this commit, the report action's context was not passed to the download route.
This was problematic as some crucial keys may be forgotten when downloading the pdf.

After this commit, we do pass the full context to the download route, ensuring consistency of the context
across calls.

closes odoo/odoo#126963

Related: odoo/enterprise#43441
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-07-12 03:48:50 +02:00
Lucas Perais 1e5c256294 [FIX] web: CodeEditor: resource-specific session
The new CodeEditor dismissed the notion of ace EditSession.
This serves to split the ace internals (history, values etc...) according
to the logical unit of a session.

After this commit, from the CodeEditor point of view for each edited resource (a view mostly)
corresponds one session.

Part-of: odoo/odoo#126963
2023-07-12 03:48:48 +02:00
clesgow 51de4ab9b5 [FIX] web: handle focus for buttons cells in list
This is reproducible in lots of ways, here's one:
- Inventory -> Products -> Any storable product
- Click on Update Quantity
- Click on the cell where the 'History' and 'Set' button are

This raises a traceback as the `cell` assigned right before is null at
that point. Indeed, since those cells from a special kind of column made
of buttons (o_list_buttons), those don't have a `name` attribute to
find, hence the traceback.

closes odoo/odoo#128014

X-original-commit: 222dc64be51cc8e711278cff96392e755ba39fd4
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-07-11 09:10:24 +02:00
Maruan Aguerdouh (magm) 66d022a4dc [FIX] web: avoid crash when deleting a property multiple times
Steps to reproduce the bug:
    - Go to Apps, and install the Knowledge App.
    - Go to Knowledge and create an article, and a child article.
    - Inside the child article, go to Properties tab and add a property.
    - Go to edit the property, and inside the popover,click on the
    delete button, atleast 2 times.
    - Now we got more than 1 popover to confirm the delete of the
    property, click delete on all of them.

Issue:
    Once the first popover is confirmed, we properly delete the property
    but now we are going to get an error because the property is already
    deleted and we won't be able to find the property to delete.

Solution:
    We need to check if we can find the property we want to delete
    before doing any further actions.

opw-3371753

closes odoo/odoo#127584

X-original-commit: 7f5aed12fb143928cc82eeeea712363cb79b1171
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
2023-07-08 21:39:43 +02:00
Mathieu Duckerts-Antoine 34f68a5f19 [FIX] web: search bar: is (not) (not) set in facets
Before this fix, a condition like "Foo is not set" created via the domain
selector would be badly described in the facet as "Foo is set".
We fix that problem and add a test that covers that situation and similar
ones.

closes odoo/odoo#127447

X-original-commit: a6b7de5d62906e5508585e0b994bf95544d10476
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-07 17:57:45 +02:00
luvi 8a4485748f [FIX] web: fix filtering when choices/groups props update
This commit fixes the filtering of choices when the choices or the groups
props values are updated. Before this commit, the filter was only triggered
when the length of choices or groups differ.

Instead, it is prefered to apply the filter of choices whenever those props
are updated (in a dedicated useEffect).

A test has been added, updating the choices props, while having an object with
the same number of choices, while having different values. Before this fix, the
filtering wouldn't be applied correctly, since the filter wouldn't be triggered
because the object has the same number of values in it.

closes odoo/odoo#127733

Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
2023-07-07 16:42:38 +02:00
Julien Carion (juca) 6abd149259 [IMP] web, *: replace search more with view all
This commit changes the behavior of the "Search More..." option in
Many2XAutocomplete and analytic distribution by making it available
as long as there's at least one record in the search results and by
renaming it to "View all".

task-3258625

closes odoo/odoo#126041

Related: odoo/enterprise#43660
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-07 15:27:50 +02:00
Hubert Van de Walle (huvw) cb5a1cfd16 [FIX] web: SelectCreateDialog should set selection_mode for kanban
Steps to reproduce
==================

- Install purchase_stock
- Use a mobile viewport
- Go to Purchase
- Click on a record
- Try to set the "Deliver To" field
- Click on a record

-> An action is triggered and the record is not selected

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

[commit] removed the only use of `forceGlobalClick`.

When it is set, KanbanRecord.selection_mode evaluates to true.

Solution
========

forceGlobalClick should be set when selecting a record from the
SelectCreateDialog.

[commit]: https://github.com/odoo/odoo/commit/6e18fb3c35281bdba26d9616150141298975bb40

opw-3337018

closes odoo/odoo#127632

X-original-commit: 7a1db9fade48d231a71084624fa0063989afd2b9
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-07-06 20:56:11 +02:00
Lucas Lefèvre (lul) 6ea05e844a [IMP] web: evaluate domain with user context
Currently, the domain editor dialog doesn't handle domains like
[('foo', '=', uid)] if you don't provide the (user) context in the
component props.

Since this kind of domain is expected to work everywhere, the component
now uses the user context by default to evaluate the domain.
There's no need to provide the context everytime the component is used.

closes odoo/odoo#127565

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-06 17:52:43 +02:00
Lucas Lefèvre (lul) b0fdb2b429 [REF] web: factorize makeDialogTestEnv helper
With this commit, the many identical implementation of
`makeDialogTestEnv` are removed in favor of a single
helper function.

Part-of: odoo/odoo#127565
2023-07-06 17:52:43 +02:00
Lucas Lefèvre (lul) 82ec77def7 [FIX] web: display contextual values in readonly domain
The domain component in readonly mode doesn't display dynamic/contextual
values.
For a domain `[('foo', '=', uid)]` the component displays "foo =" instead
of "foo = uid"

Part-of: odoo/odoo#127565
2023-07-06 17:52:42 +02:00
Michael (mcm) ac153558a6 [FIX] web, mail: indirectly call a patched function
The commit [1] removed two async module and caused a reorganisation
on the module loading.
Since that commit, the patches could be applied in a different order
and be applied after a save of one these patches.

This commit fixes a case where we save the reference of a patched
function that we call it later with missing patches.

[1]: 96687f29496ab4cf16ae2ab1584ef1a6a3fb4a11

Part-of: odoo/odoo#121185
2023-07-05 15:58:20 +02:00
Michael (mcm) 69afcfcc1a [FIX] web: prevent false test fail
The commit [1] removed two async module and caused a reorganisation
on the module loading.
Since that commit, two tests that throw an error failed
because the error message was written in the console
and the server considered this as a test fail.
Now, the error message is not written in the console anymore.

[1]: 96687f29496ab4cf16ae2ab1584ef1a6a3fb4a11

Part-of: odoo/odoo#121185
2023-07-05 15:58:19 +02:00
Michael (mcm) 03ad36676f [FIX] web: reset uniqueId to 0 in tests
The commit [1] removed two async module and caused a reorganisation
on the module loading.
Since that commit, `uniqueId` did not begin with the id 1 in its test
and so the test failed.
Now, the variable containing the last id of `uniqueId` is set on the
function itself. This allows us to reset the id in the test.

[1]: 96687f29496ab4cf16ae2ab1584ef1a6a3fb4a11

Part-of: odoo/odoo#121185
2023-07-05 15:58:19 +02:00
Michael (mcm) 3933dac0c7 [REF] web: remove top level await
This commit removes two top level await in test files and reorganises
a bit the tests setup as the module loading sequence has changed.
The commit also converts the modules that contained
these top level await to esm.

The goal of removing async modules is to simplify the
module loader in the future.

task id: 3265979

Part-of: odoo/odoo#121185
2023-07-05 15:58:19 +02:00
Julien Carion (juca) da24433f65 [FIX] web: Dialog buttons for form and x2many disabled
This commit fixes an issue with dialog buttons where it is possible
to trigger their action multiple times if the network is slow. This
is solved in form dialogs and x2many dialogs by disabling the buttons
when the user clicks on them.

opw-3291929

closes odoo/odoo#120151

Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-07-05 11:37:03 +02:00
Mahdi Cheikh Rouhou (macr) 328f0ec84c [FIX] web : display currencty in correct place
This fix is a continuation of an old fix https://github.com/odoo/odoo/pull/121689
After fixing the display of numbers to be always on the right , The symbol also should be display the same as in english from ltr.
Also the headers and the footers are not placed well, they should be aligned with the numbers.

Steps to reproduce the issue :
1-install arabic language
2-go to accounting / customer invoices and you can see the placement of the symbol is reversed

opw-3295573

closes odoo/odoo#127231

X-original-commit: 8fcdc24abf4734d020cb41392a2e449a73433d3b
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-07-04 15:18:23 +02:00
stefanorigano (SRI) b1d75b0134 [FIX] web: adjust formView and alerts spacing
This commit adapts several spacing issues related to the formView and
alerts.

task-3355091
Part of task-332626

closes odoo/odoo#127201

X-original-commit: a137b33dbbf0d18ac6909f958d126c7922d12a61
Related: odoo/enterprise#43579
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-04 12:47:07 +02:00
Ali Alfie (alal) 3c6c6e6bb3 [IMP] web: rename cancel button in RedirectWarning to close
"Cancel" button in the RedirectWarning is renamed to "Close"

task-3339621

closes odoo/odoo#125751

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-07-03 21:55:53 +02:00
Mathieu Duckerts-Antoine 1c2c18a0a5 [FIX] web: domain selector: invalid path/operator
We make the domain selector accept any expressions in the first and
second components of a domain condition. Along the way, we have found
necessary to refactor the Tree type (see domain_tree.js) and use it
directly in the domain selector instead of having yet another auxiliary
structure. Another simplification brought by this commit is that the
virtual operators is, is_not, set, and not_set are introduced earlier
and make possible to simplify the way operators are managed.

closes odoo/odoo#126350

Related: odoo/enterprise#43161
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-07-03 16:58:55 +02:00
Mathieu Duckerts-Antoine 2b23f73f51 [IMP] web: domain selector: use TagsList in TagInput
We make TagInput use the generic component TagsList. This gives a better
looking/working to the editors used for the operators "in"/"not in" for
char fields.

Part-of: odoo/odoo#126350
2023-07-03 16:58:55 +02:00
Mathieu Duckerts-Antoine 1b94eefe26 [FIX] web: domain selector: treat false,true as in py interpreter
A string representation of a domain like "[('bar', '=', false)]" is
evaluated by py.js the same way as "[('bar', '=', False)]".So both domains
are recognized as correct while false is not a valid python expression.
We do the same in domain selector, the expression "false" ("true")
will be understood as "False" (resp. "True").

Part-of: odoo/odoo#126350
2023-07-03 16:58:54 +02:00
Mathieu Duckerts-Antoine 089e0e680c [IMP] web: domain selector: in/not in labels
We change the label of "in" to be "is in". The label of "not in" becomes
"is not in"

Task ID: 3291990

Part-of: odoo/odoo#126350
2023-07-03 16:58:54 +02:00
Julien Mougenot 5b2593e675 [REF] web: Make datetime hook independant from props
This commit makes the datetime hook independant from the props update
mechanism it previously relied on (onWillStart & onWillUpdateProps) to
update its internal props.

This was an incoming issue as the future relational model will rely on
fine-grained reactivity to update the fields rather than updating the
model and re-rendering all child components (effectively calling
'onWillUpdateProps').

Now, the hook relies on an internal state that tracks whether the props
given by its caller changed from one render to another, which is checked
at render time (i.e. in 'setup' and 'onWillRender').

closes odoo/odoo#125039

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-03 12:21:05 +02:00