Following the introduction of the `showWeekNumbers` prop on
DateTimePicker component (see commit 7552284e78),
the number of column (CSS custom property) wasn't properly defined in
the template.
This commit fixes it and adds related asserts in QUnit tests.
closesodoo/odoo#135427
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Steps to reproduce:
-------------------
For example:
- add a work permit file to an employee (private information tab);
- try to download it before saving;
Issue:
------
The old file is downloaded or a traceback occurs
if there was no file before.
Cause:
------
When downloading, we use the `/web/content` endpoint.
We will try to read the record in the backend via `_record_to_stream`.
The record is not yet saved in database.
Solution:
---------
Disable download button if record is dirty.
opw-3458842
closesodoo/odoo#135405
X-original-commit: 3557e66a410428b877213508104e9accbbfdaf20
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
The Dynamic placeholder was not opening properly in mail template since the wysiwyg OWL conversion.
Fix it and also fix the tour that should have detected this error.
The tour itself was not running properly.
task-3495254
closesodoo/odoo#135275
X-original-commit: df8532cffc74038db0faef36b5f43758e1bbdf43
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
This commit adjusts the width of the domain selector to fill the entirety
of its parent so that its dimensions are not restricted by the flex
display
closesodoo/odoo#135228
X-original-commit: cae3a05904cc3fa7a2afadbb6f751f619021fd2d
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
* = account, base_iban, bus, calendar, crm_livechat, hr, hr_holidays,
im_livechat, mrp, project, sms, snailmail, test_mail,
test_mail_full, web, website_livechat, website_slides
Add support in `contains` for most operations that we use in tests.
Remove return value from `contains`.
Move into `web` module.
Remove import/export chains, directly import from correct module.
closesodoo/odoo#134652
Related: odoo/enterprise#47064
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The goal of this commit is to ensure that the form view dialog close
button performs the same behaviour as the discard button.
To enable this, we had to add the dialogData.dismiss, which lets you add
a callBack that will only be executed when a dialog is closed because of
the "x" or the "escape" shortcut.
closesodoo/odoo#135116
Related: odoo/enterprise#47283
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Slightly increase the component size and adapt its margin/padding in
order to accommodate more text.
Also, this commit addresses an issue that made [1] necessary.
Indeed `o_cursor_pointer` has been replaced by `cursor-pointer` in
commit [2], but the change wasn't applied on `o_search_panel`.
[1] https://github.com/odoo/odoo/commit/223b9e9
[2] https://github.com/odoo/odoo/commit/bd2a111
part of task-3326263
task-3476147
closesodoo/odoo#134817
X-original-commit: 4e82f72b481f69cde546bc6acfe22582b64b6bad
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit adds `target=download`, as `target=self` adds some unwanted
visual effect. In other words, the "block UI" is never unblocked when
some actions are triggered. This is specific for "Download" actions as
the download is correctly executed, but the page is never `unload`.
e.g.:
```python
action = {
'type': 'ir.actions.act_url',
'url': '/web_enterprise/partner/%d/vcard' % record.id,
'target': 'self',
}
```
Note:
We can't use "'target': 'new'" as it creates a bug in Mobile Apps.
When The Mobile Apps create a new "Tab/Page", they do it in a new
sandboxed browsing environment, so the user isn't logged in and the
resource isn't accessible anymore.
Task ID: 3435131
closesodoo/odoo#134436
X-original-commit: 08db3deb3336f0c1ff9fe2703ebeb8ea5b5aeb3d
Related: odoo/documentation#5822
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit adds the functionality to refresh notifications when the user
hovers on them to reinitialize the close delay.
task-3444667
closesodoo/odoo#132713
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
This commit applies several modifications to the command palette:
- The list of menus for the current app is now hidden in the command
palette
- The assign user commands of the palette are now available in list
view when multi-edit is supported and a mechanism to avoid command
duplication has been implemented so that if several fields use the same
command, it will be displayed with an identifier in the palette and the
commands won't overlap
- The assign/unassign to me command is now split into assign to me and
unassign from me. The presence of the commands depends on whether they
would have an effect or not
- The "View switcher" command category is moved to second last position
of the command categories
task-3235223
closesodoo/odoo#129743
Related: odoo/enterprise#44620
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
This commit fixes the text truncate that should not be applied on some of
the cells inside the `listView` (causing a dot next to graphical elements).
This issue was created by this commit (a6dd707).
The inline-block display of o_field_widget was the source of the issue.
We also changed the called mixin text-overflow to text-truncate for
cleaner code. The vertical align top is then removed, and we added a
vertical align middle to fix the wrong alignement of some elements.
Thoses modifications also fix the issue with where the tags were cut in
the `listView` when the window was smaller.
task-3455121
Related to task-3326263
closesodoo/odoo#134878
X-original-commit: 53f605399755f9355554c2582ea0f693c8f947b4
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Establish a set of target font-weight values (may not directly match the
final result on screen).
Enable the system to naturally utilize the "bolder" font-weight.
Remove previous customizations designed for "Roboto" that clashed
with certain system-fonts.
Enforce the "normal" font-weight for icons, regardless by their parent
design.
Adapts some kanban titles.
closesodoo/odoo#134824
X-original-commit: 74fce06cad4000a3894757d4fef9074b64153b7b
Related: odoo/enterprise#47140
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Co-authored-by: Brieuc-brd <brd@odoo.com>
This commit removes the jQuery UI Datepicker usage for the sidepanel's
mini-calendar in the Calendar View and replace it by our own
DateTimePicker component.
On the visual side, the styling has been aligned to the DateTimePicker
one and takes a bit more space to allow a better readability.
It also adds two props to the DateTimePicker:
- showWeekNumbers : allow to show or hide the week numbers' column, default to true.
- daysOfWeekFormat : allow to choose between the "short" or "narrow" (1
letter) format for the week's days column header, default to "short".
task-3439226
closesodoo/odoo#134263
Related: odoo/enterprise#47114
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit removes the usage of Bootstrap's Collapse widget and replace
it by the `useTransition` hook when discarding an OnboardingBanner.
task-3439226
closesodoo/odoo#133917
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Before to this commit, the activeFields of the fields in the x2many arch
were not merged with those of the relatedFields.
Problem:
When I have a custom x2many field that contains a many2one "x" field in its
relatedFields and this field is also present in the arch with column_invisible="True".
The field is considered invisible because its presence in relatedFields is ignored.
Solution:
Merge the field description in the arch with that in relatedFields.
Before:
Only the "id" of the many2one field is present in "web_read".
After:
The "id" and "display_name" of the many2one are present in "web_read".
closesodoo/odoo#135216
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The moment.js library is officially done and no longer recommends its
use for new projects. As such, we have been progressively moving to
luxon instead. Until recently, we still had some libraries that depended
on it, and some leftover calls to it. This is no longer the case, and as
such, the library can be removed completely.
closesodoo/odoo#135182
Related: odoo/enterprise#47304
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Impacted versions:
16.3+
How to reproduce:
- open CRM > Forecast
- drag&drop a lead from a column to another
- click on "add next month" button
Current Behavior:
- the progressbars revert back to their state before the drag&drop
Expected Behavior:
- the progressbars keep their updated value after the drag&drop
Technical explanation:
After [1], the split of the progress bar logic from the relational model, only
notifying the model of a reload is not enough to correctly update the
progress bar values. It is therefore required to manually do it in the CRM
Forecast view after adding a column.
Master update:
Furthermore, after [2], the adaptation of the codebase to the new relational
model, the domain modification of the `forecast_kanban_model` was not
transcripted correctly: the domain modification for the fillTemporalPeriod
should be added by replacing the previous one if present, not simply added
(because then we have a constantly growing domain with contradictory leaves).
Also, since the new `RelationalModel` makes it mandatory to render the view
after a `DynamicGroupList.load` because `DynamicGroupList` is `Reactive`, to
avoid `progressBars` flickering when adding a forecast kanban column, the
`ProgressBarHook._updateProgressBar` should store the result of its
`read_progress_bar` call in `_pbCounts`. This makes it so that when the
`DynamicGroupList.load` is done, already computed progressBars will keep their
value and not switch back and forth between the previous state of `_pbCounts`
computed in `loadProgressBar`.
[1]: https://github.com/odoo/odoo/commit/58ca40b03215ef4c6c575267494dc8bccc30a033
[2]: https://github.com/odoo/odoo/commit/218ad8456a06503dd508e7216edcffdc90b35cac
task-3497579
closesodoo/odoo#135149
X-original-commit: b53b46ec36818615b7beb1d24fd44c9f8d69063a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Damien Abeloos (abd) <abd@odoo.com>
Prior to this commit, the setting page had 2 vertical scrollbars, which
wasn't clear to use on mobile.
This commit changes the scrolling orientation of the app selector on
mobile to make it easier to use in small screen.
task-3349528
closesodoo/odoo#135214
X-original-commit: 4b8d93799c32a62f16200a88ad32000203918d63
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Because why not?
We often need to re-render the user interface from python, but limited to call a browser reload (redirect to current URL).
With this simple client action tag `soft_reload` - we can quickly reload the UI, without a hard refresh.
An example use case: refresh the kanban when an onboarding step is done via a dialog. See `validate` in 'account.setup.bank.manual.config'
closesodoo/odoo#134929
X-original-commit: 422d2b0512216514aa856bffedc774d17faf6bcb
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
This commit allows users of the datetime picker service to pass
functions that will be called to check the validity of specific days or
that generate a class for a given day. This can be useful in some
contexts for example when you want to prevent the user from selecting
days on the weekend for certain operations, or to highlight some days
where a given product is not in stock.
closesodoo/odoo#134647
Related: odoo/enterprise#47061
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Have a form view with a view button. Make some changes in the form
s.t. the create/write rpc will return an error. Before this commit,
the "oh snap" dialog was displayed, providing 2 choices to the
user: stay here (basically, close the error dialog and do nothing
else) or discard (discard changes, and continue the flow). In this
case, the flow is to do the "call_button" as we clicked on a view
button. It means that if the user clicked on discard, we still
call the method/action, even though the record was invalid (and
maybe not even existing if it was a new record). This can cause
other issues afterwards.
The "oh snap" dialog was designed for navigation flows (e.g. menu,
breadcrumbs...), when the user tries to leave the form view. It
doesn't fit very well with flows involving the current record that
couldn't been saved.
This commit thus prevents the "oh snap" dialog from being displayed
if the save preceeding a call_button fails. The error returned by
the save is simply displayed in a basic dialog that can only be
closed.
opw~3395109
closesodoo/odoo#135050
X-original-commit: 50b2a24f22cb470bcc1a9befe677cf794211d7b2
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Since 0eff29409d, the behavior was
unpredictable when clicking on multiple companies before a reload.
This simplifies the implementation and the behavior:
* the behavior is always the same even if there were already multiple
companies selected: if one wants to add new companies they should use
the check box instead.
* there is no more confusion due to the storage of the symetrical
difference when toggling multiple companies and their children before
the reload.
closesodoo/odoo#135086
X-original-commit: b07b30cd4b2a3e821a24761075ae0aecee332b14
Related: odoo/enterprise#47265
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
Have a form view with an x2many list with handle field and a
default_order containing id (e.g. sequence,id), but id not being
defined in the list view. Before this commit, on an existing
record, it was impossible to resequence records of the x2many.
The reason is that after resequencing (drag&drop), the model tried
to sort the records, and since the "id" field wasn't in the view,
but was in the default_order, records were reloaded and the changes
(the new sequences) were lost.
The "id" case is special because the field doesn't need to be set
in the view, it is always known by the model. However, it is only
available in record.data if it is defined in the view. This commit
treats the "id" field individually in the sort algorithm.
Bug reported in the new relational model feedback pad.
closesodoo/odoo#135045
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Before this commit, if an onchange returned an error, the faulty
value was kept in the UI and there was no feedback given to the
user besides the error being displayed in a dialog. However, the
former value was still the one stored in the model, which produced
a discrepancy between model and UI.
This commit tackles the issue by marking the field as invalid in
this case (like when you input letters inside a numeric field).
That way, the value in the model is still different from the one
in the UI, but the field is stored in the list of invalid fields,
it is displayed in red, and the view can't be saved (it can be
discarded though).
Task~3498849 (master version, which differs from 16.0, see [1])
[1] odoo/odoo#134792closesodoo/odoo#135017
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
In this commit, we moved all features related to the PWA and the PWA
itself to the community.
This includes:
* PWA
* Web Push Notification
* VCARD
Note from original commits:
===========================
PWA (part 1)
------------
This commit adds a ServiceWorker to complement the WebManifest to
complete the setup of the backend as a Progressive Web App.
More precisely, it adds the route, registration and the most basic
ServiceWorker to allow the backend to be recognized as an installable
PWA.
References:
- https://web.dev/install-criteria/
- https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Installable_PWAs
- https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers
Task ID: 3063485
PWA (part 2)
------------
This commit adds a WebManifest as a first step toward setuping the
backend as a Progressive Web App.
In a nutshell:
- the web app's name is configurable through a config parameter
(available in the Settings, in debug); defaulting to "Odoo".
- the web app's icon has been revamped to accommodate the required sizes;
also its design matches the one from the Android app.
- "theme-color" is used to color part of the browser/system UI to match
Enterprise brand color; also supports the dark mode.
References:
- https://web.dev/learn/pwa/web-app-manifest/
- https://web.dev/install-criteria/
- https://developer.mozilla.org/en-US/docs/Web/Manifest
Task ID: 3063485
PWA shortcuts
-------------
The main goal of this commit is like we did inside the `Android Odoo
Mobile App`, allowing users to have some Odoo application shortcuts.
We added the following apps in the key `shortcuts` on `web.manifest` in
these orders: `Discuss`, `CRM`, `Project`, `To-Do` (old `Notes`).
Links:
- https://w3c.github.io/manifest/#shortcuts-member
- https://developer.mozilla.org/en-US/docs/Web/Manifest/shortcuts
Task ID: 3123607
Offline mode
------------
This commit introduces a way to notify the user that he's "offline"
(aka. cannot reach its Odoo server) and that Odoo doesn't work in a
graceful way in this circumstance.
To do so, the Service-Worker will return the response of the
´web/offline´ route, which is cached at its setup.
Note: this screen is only show when launched while "offline" and fails
to load the requested page. It does not "interrupt" the WebClient to
show this screen when the connection drops off (cf. not a replacement
for the existing notification).
Task ID: 3203639
WebPush
-------
WebPush allows sending data to the user browser/app(PWA) even when
tab/app is closed. Web push is a "constant" link between the
ServiceWorker of browser/app and a WebPush server.
Note that each browser has its own custom WebPush server.
e.g.:
Chrome: https://fcm.googleapis.com/
Firefox: https://updates.push.services.mozilla.com/
Safari: https://web.push.apple.com/
Edge: https://wns2-ln2p.notify.windows.com/
WebPush introduces some cryptographic notion to ensure some the
reliability of the data sent:
VAPID: "Voluntary Application Server Identification" is the standard
used to generate the public and the private to sign the message
between the browser and the WebPush server
JWT: "JSON Web Token" is the standard used to sign the payload to the
WebPush server
ECE: "Encrypted Content-Encoding" is the standard used by WebPush to
encrypt the data of the payload to avoid sending RAW data
outside trusted network.
Simplified steps how to WebPush works:
The Javascript code of a web page subscribes to the WebPush server
(using the VAPID key generated at mail_entreprise install).
The WebPush server replay with a subscription (and some other info
like the unique URL endpoint per subscription where to send a
notification)
The application (odoo-bin in our case) sends a post request to the
WebPush server using the specific URL endpoint of the user (using JWT
and ECE).
The WebPush server sends back to the browser the encrypted payload.
The browser decrypts the payload and sends it to the ServiceWorker
linked to the subscription.
Here is a Sequence diagram of all interactions to process a web push
notification.
In Odoo, we use WebPush to send Notification to the user.
This commit aims to have a parity with the Android/iOS Mobile App at
the notification level.
Notes:
There are some ways to encrypt (ECE) the message for WebPush:
AESGCM128: this is a draft
AESGCM: very well documented
AES128GCM: RFC8188 Standard encoding
We implement only the RFC one as it is the only one implemented in all
major updated browsers (Chrome, Firefox, Safari, Edge, ...)
You need to allow the desktop "Notification" and "Push" inside your
browser. For iOS Devices, it only works on iOS 16.4+ and it's requiring
Odoo to first be added to the Home Screen. It's delivered silently,
meaning no sound, vibration, haptics or screen wake.
Note:
Notifications are sent directly if there are less than five
notifications, otherwise we use a cron triggered immediately.
Also, we have changed the value of the "QueryCount" as mail_enterprise
executes a new query to search the devices associated with the partner.
We have added a "try/except" for any Exception before the
push_to_end_point method as we want to avoid blocking a normal flow
just for a not mandatory push notification if something happens during
the push to the endpoint.
See: odoo/enterprise@d0ae70103d
Links:
https://www.rfc-editor.org/rfc/rfc8030https://www.rfc-editor.org/rfc/rfc8188https://www.rfc-editor.org/rfc/rfc8291https://www.rfc-editor.org/rfc/rfc8292https://w3c.github.io/push-api/index.htmlhttps://autopush.readthedocs.io/en/latest/http.htmlhttps://web.dev/push-notifications-web-push-protocol/https://github.com/web-push-libs/encrypted-content-encodinghttps://github.com/web-push-libs/pywebpushhttps://github.com/web-push-libs/vapidhttps://caniuse.com/push-api
Task ID: 3123678
VCARD
-----
In the process of replacing the native methods exposed in the mobile
apps, this commit implements the download of a vCard containing a
partner's information.
By using this standard format, both regular web users and mobile ones
are now able to save the partner's details to use them with their usual
address book software.
On a mobile device, the actual import of those informations is delegated
to the operating system.
References:
- https://datatracker.ietf.org/doc/html/rfc6350
- https://en.wikipedia.org/wiki/VCard
- https://github.com/eventable/vobject#vcards
Task ID: 2583916
===========
End of note
===========
Task ID: 3478014
closesodoo/odoo#133560
Related: odoo/enterprise#46530
Related: odoo/upgrade#5086
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
Co-authored-by: Romain Estievenart <res@odoo.com>
Co-authored-by: Pierre Paridans <app@odoo.com>
This commit rewrite the module loader to simplify it and to improve error handling.
before this commit, you could have silent errors or "lucky" imports (import a module based on the fact that his asset will surely be load and if not, the error would be silent anyway).
e.g.: The tours cannot import modules extern to tours' bundle anymore. Or load module before your libs in assets.
TASK ID: 3266021
closesodoo/odoo#128502
Related: odoo/enterprise#44100
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
To reproduce
============
* referrals -> configuration -> rewards
* try creating a new reward keeping description empty
* here description is required html field
* traceback on clicking save
Problem
=======
in case of html field, `this.data[fieldName]` is an object `Markup{''}`,
so `!this.data[fieldName]` is always `false` as objects are considered
as true value in JS.
Solution
========
in case of html, check the length of the Markup object
opw-3469539
closesodoo/odoo#134365
X-original-commit: dce8e1a8b6137c035488240f8004b870b73c8d51
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
Co-authored-by: Niyas Raphy <https://github.com/niyasraphy>
When passing a date out of the current as a props to the DateTimePicker
component, the chosen date is actually set but the calendar doesn't
rerender to display the corresponding month.
This commit fixes this behavior to properly focus the date's month.
closesodoo/odoo#134844
X-original-commit: 9dbb35479615f5aef7b22f21bf9f58f176874886
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Before this commit, emoji and gif pickers were handled as 2 different
pickers. They had dedicated buttons. This made composer quite
bloated, especially in chat windows were size is narrow.
Also the pickers were always displayed as popover, which is not the
best way to show content in mobile.
This commit improves those pickers in discuss so that only a single
button is present (emoji button). Clicking on this button shows a
picker that groups the emoji and gif picker, both of which can be
selected in the header of the grouped picker.
In mobile, instead of showing a popover, it now shows the grouped
picker below the composer. This makes it show where the soft keyboard
is present in mobile, making it easier to input emojis or gifs on
those devices.
This commit also added slight style changes to both pickers. Notably,
the search bar has an improved style that makes it look good when
next to the composer text input, especially in mobile layout.
task-3015707
closesodoo/odoo#123671
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit tried to remove owl_compatibility completely but its last
uses are either in refactoring or a bit complex to migrate. Instead of
removing the helpers completely, this commit simplifies them a lot and
makes them more readable and safe.
closesodoo/odoo#134295
Task: 3439226
Related: odoo/enterprise#46899
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Purpose
=======
Add tests about the group by properties feature, the drag and drop
and the behavior in the pivot view.
Task-3032464
Part-of: odoo/odoo#103510
Purpose
=======
Allow to group records by their property values,
like we can do with normal fields.
Technical
=========
Because there's no foreign key, when we group by a relational property
we need to check the existence of the ids in the query (and same for
selection and tags, because we might have value of a deleted
option / tag in database).
Task-3032464
Part-of: odoo/odoo#103510
Before this commit, when opening emoji picker and scrolling down
then making search, the scroll position was not reset to top.
This gave the impression that the search was incorrect, because
the most likely desired emoji is at the very top but was not visible
when searching in this condition.
This commit fixes the issue by enforcing scrolling top in emoji
picker content when the search term is updated.
Task-3493611
closesodoo/odoo#134675
X-original-commit: 7999ae51c51e24eea15edb8f08b2e35db4a774ad
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*account,web_editor,website,website_sale,website_slides
This commit removes all legacy utils except Markup, which will be
removed in another PR. A lot of those utils were no longer used and
thus have just been removed. Those that were still used either
already existed in the wowl codebase, so usecases have been adapted
to use the new version instead. A few have been re-implemented (or
moved basically) to the wowl codebase (e.g. isEmail and humanSize).
Part of task~3439226
closesodoo/odoo#134620
Related: odoo/enterprise#47044
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Previously we removed some code related to handling errors in legacy
RPC, that would wrap errors in an object and give them an event that
could be defaultPrevented to mark the error as handled, but this code is
still needed. This commit restores it.
closesodoo/odoo#134693
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
This util was used in :
- owl_dialog_tests
- field_one2many_tests
- relational_fields_tests
- gantt_tests (enterprise)
These files are now converted to WOWL.
closesodoo/odoo#134684
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
In this commit we create a DynamicModelFieldSelectorChar widget. Purpose is to
use it in WhatsApp to select fields when trying to make a valid path to find
information on a given model. Example
<field name="xxx" widget="DynamicModelFieldSelectorChar"
options="{'only_searchable': true}"/>
It is based on char widget, using only_searchable options.
Task-2377154 (Add WhatsApp Support)
Part-of: odoo/odoo#134377
Co-authored-by: Akshat Trivedi <aktr@odoo.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
Co-authored-by: Gitashri Mantha <gman@odoo.com>
Co-authored-by: Jigar Vaghela <jva@odoo.com>
Co-authored-by: Kashyap Patel <kasp@odoo.com>
Co-authored-by: Khushi Vakil <khva@odoo.com>
Co-authored-by: Nishant Jain <niai@odoo.com>
Co-authored-by: Prakash Prajapati <ppr@odoo.com>
Co-authored-by: Priyanshi patel <prpa@odoo.com>
Co-authored-by: Rahul Prajapati <rapr@odoo.com>
Co-authored-by: Renaud Thiry <reth@odoo.com>
Co-authored-by: Shreya Patel <shpa@odoo.com>
Co-authored-by: Stéphane Debauche <std@odoo.com>
Co-authored-by: Zeel Patel <zepa@odoo.com>
Issue:
======
- Display of monetary values in kanban views is wrong in rtl language
- Pivot display has multiple erros in rtl language: values are left
aligned and they are supposed to be right aligned like in ltr lang,
negative numbers has the sign in the wrong place, the (plus/minus)
icon placement is wrong (it should be before the title and not after)
Steps to reproduce the error:
=============================
- Install accounting and rlt language (arabic for example)
- Go to accounting (display of monetary fields is wrong)
- Go to accounting/accounting/journal items/pivot view
- Choose residual amount in view (it has some negative values)
Solution:
=========
Kanban Solution:
- I fixed the direction of the display to be ltr always for monetary
values and added the class to the appropriate tags.
Pivot Solution:
- I fixed the direction and text-align style for the values to always
display the same like rtl.
- displaying the icon and then the title will always give the desired
display since the direction will reverse their order itself when it's
rtl
enterprise fix : https://github.com/odoo/enterprise/pull/46675
opw-3295573
closesodoo/odoo#134296
X-original-commit: 6b7f89b43b6abc970c955760da203a1e41c53652
Related: odoo/enterprise#46900
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
Issue:
When uploading a large custom module via studio for importing, Chrome
crashes with an internal SIGKILL and Firefox manages to load, but is
really sluggish.
Steps to reproduce:
- Install Studio
- In the Apps Dashboard > Customizations > Import
- Upload a large custom module (50 MiB)
- Chrome crashes, while on Firefox the page is sluggish
Cause:
In the module `base_import_module`, the `module_file` doesn't have a
corresponding `filename`, therefor the name used to be displayed in
the wizard is the content of the binary file in base64 encoding...
For a module that is of a large size, this is a *gigantic* string
that crashes Chrome and slows down the DOM on Firefox.
Fix:
Truncate the maximum filename that is displayed in the template to
the max length necessary to encode in base64 (0xFF) 255 bytes, as
255 bytes is the maximum filename size on Linux/Windows/MacOS.
Affected versions:
16.0 up to master
Reference:
opw-3491998
closesodoo/odoo#134532
X-original-commit: 218c9875c0422beb2a5b199797e531ed3625a13b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
In this commit, the loadXML function has been removed. We use registry with
xml_templates to load XML templates for OWL Apps.
The goal of task is to remove loadXML and getBundle from assets to simplify
the understanding of assets api.
task-3266441
closesodoo/odoo#134520
Related: odoo/enterprise#47001
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Before this commit, in a calendar view with a properties field, a crash
will be display when you click on an event.
closesodoo/odoo#134476
Related: odoo/enterprise#46990
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Switch to using scss variables instead of hardcoded colors to support dark mode
in field selector popover.
Steps to reproduce:
Turn on Dark mode. Open Automated actions and add a model. Edit domain and
start typing: text is white on white, the popover does not adapt to dark mode.
opw-3453065
closesodoo/odoo#134458
X-original-commit: 5a57bd799688ee7a2c2e29d775fda73bba34c777
Signed-off-by: Tom De Caluwé (tdc) <tdc@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
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
closesodoo/odoo#134470
Related: odoo/enterprise#46987
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Before this commit, formatters like `formatMonetary` and `formatFloat`
weren't loaded in the assets front-end.
This commit introduces `formatAmount` ( `formatMonetary` calls
`formatAmount` but makes some prior processing to deduce the currency
from the field) and makes `formatAmount` and `formatFloat` accessible
from any front-end application.
Note: The currencies were added in the front-end session info because
they are needed in `formatAmount`.
closesodoo/odoo#133824
Related: odoo/enterprise#46658
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
When a dialog is closed, the focus is meant to be restored to the
previous focused element.
Before this commit, it did not work for the ConfirmationDialog when the
confirm button was clicked. This was because the focus was lost **before**
the dialog was closed (because the confirm button is disabled when
clicked), and thus the previous focused element was not in the el of the
dialog anymore, and thus the focus was not restored.
closesodoo/odoo#134456
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Commit 80f8281 introduced an unwanted padding on the right in
`o_list_selection_box` on large screen.
This commit adapts the spacing of this element to maintain the same
rendering whatever the screen size.
task-3454841
closesodoo/odoo#134384
X-original-commit: ed29d31ab7bb8d697c6515f3383a8b687f486e8e
Signed-off-by: Pierre Paridans (app) <app@odoo.com>