Commit Graph
17543 Commits
Author SHA1 Message Date
Louis Wicket (wil) f1722c7334 [IMP] *: unify sprintf and gettext
Improve gettext to directly handle value injection within translations,
removing the need for sprintf.

closes odoo/odoo#123932

Related: odoo/enterprise#45370
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-10 18:14:04 +02:00
Khushi 98218629f8 [IMP] model_selector: modified related model dropdown behaviour
Before:
When number of available domains exceeded the display limit, user was
unaware of the other available domains as nothing in UI indicated so.
Visible entries change only when user starts typing something.

After:
This commit adds a 'Start typing...' entry after visible models in
dropdown menu whenever number of available models exceed the display limit,
in order to provide a hint to the user.

When user starts typing, 'Start typing...' entry disappears and all available
domains are displayed with a scrollbar.

Task ID : 3375332

closes odoo/odoo#126156

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-08-10 17:01:38 +02:00
Nicolas Bayet 645b6b2c10 [FIX] web_editor: properly fetching of colorpicker template
As described in #129974, the colorpicker cannot cache a promise
protected by `useService`. #129974 fixes the issue by through non
idiomatic practice (calling a service that is not protected by
`useService`). This commit fixes the issue idiomatically.

This commit caches the promise directly from a service and removes the
caching code from the `ColorPalette`.

task-3446691

closes odoo/odoo#130789

X-original-commit: 1d2e54088b0f0e28464ab6aa884fb2e1110e8e04
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-10 06:17:03 +02:00
Didier (did) 630178359d [IMP] mail: introduce mail services module
This PR cleanup service typing:

* Introduce `addons/mail/tooling/type/services.d.ts` to automatically type
services imported by `useService` hook.
* Correctly type service constructor, setup and start functions.
* Remove now useless `@type`.
* Removing `Object.assign` for services variables.
* Type OdooEnv.services to services.

closes odoo/odoo#131192

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-08-09 19:27:09 +02:00
Maryam Kia 8d039cafe3 [IMP] mail: Send voice messages in discuss chats and channels
With this commit, users can send voice messages in channels and chat.
There's a new button in composer to record audio from the microphone,
up to 1 minute clip duration. This adds a voice attachment with its
dedicated voice player that shows waveforms and allows playback.

To ensure compatibility in all supported browsers, we choose to
encode voice recording with `audio/mp3` thanks to lib `lamejs`.

Task-3240168

closes odoo/odoo#117036

Related: odoo/enterprise#45482
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-08-09 13:20:46 +02:00
FrancoisGe c7524e2d8b [FIX] web, *: record key is reactive in KanbanRecord
Before this commit, calls to record[fieldname][value/raw_value] in
the arch of a kanban view did not take into account updates on the Record
Datapoint. So if any data in the Record changed, the [raw_value/value]
was not modified.

In a custom KanbanRecord, you should never use the record containing the
value and raw_value. We will therefore replace this call by using the
datapoint record directly.

How to reproduce:
    - Have a kanban view with a record.my_field.value and a widget allowing
        you to modify the value of my_field.
    - Click on the widget

Before this commit:
    The value of my_field does not change

After this commit:
    The value of my_field has been updated.

closes odoo/odoo#131165

Related: odoo/enterprise#45413
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-09 03:08:00 +02:00
Pierre Pulinckx (pipu) b1ebe3b6f4 [REF] *: Replace core._t imports
In this commit, _t import from import { _t } from
"@web/legacy/js/services/core" and from
 web/static/src/legacy/js/core/translation.js are replaced by
@web/core/l10n/translation.js.

task-3292454

closes odoo/odoo#130865

Related: odoo/enterprise#45270
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-09 00:13:08 +02:00
Maximilien (malb) 16488e5603 [IMP] l10n_sk,l10n_cz: invoice layout legal imp
before this PR, some legal information were missing from our invoice layout,
for the l10n_cz and l10n_sk localization.

For l10n_cz:
- On move we add a taxable supply date
- On the company we add a trade registry field
- On report template we add the company_registry, the vat number

For l10n_sk:
- On move we add a taxable supply date
- On the company we add a trade registry field and income tax id
- On report template we add the company_registry, the vat number and income tax
id

closes odoo/odoo#126837

Task: 3374969
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-08-08 22:41:00 +02:00
Samuel Degueldre 627259e0da [IMP] web: update owl from 2.2.4 to 2.2.5
Release notes:
https://github.com/odoo/owl/releases

Commits:
[FIX] compiler: fix xmlns attribute not being set correctly in firefox
[FIX] compiler: fix t-call at root of template causing crashes
[REF] compiler: minor cleanup
[FIX] devtools: fix inspected path

closes odoo/odoo#131082

X-original-commit: ad9db912c45ebd49d9df87fbaee1f8b49421b081
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-07 20:59:06 +02:00
Hubert Van de Walle (huvw) f603e86959 [FIX] project, web: create_group compatible with custom _rec_name
Steps to reproduce
==================

- Enter studio
- Create a new app
- Create a new model with "pipeline stages" enabled
- Close studio
- Switch to the kanban view
- Add a new stage

`ValueError: Invalid field 'name' on model 'x_test_stage'`

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

A model _rec_name is not always name. This is the case for example with
studio stages. In that case,  `_rec_name == 'x_name'`.
Since [commit], we do a create instead of a name_create.

Solution
========

First do a name_create to handle custom _rec_name. Then if there is
still some field to be written, do a simple write.

[commit]: 4e974e5

opw-3432017

closes odoo/odoo#130921

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-08-07 19:57:54 +02:00
Michael (mcm) 00d8aef1c7 [REF] web, *: remove legacy patch
This commit removes legacy patch/unpatch functions and adapts their use
by using the modern patch. There was also a custom patch function used
in tests which has been replaced too.

closes odoo/odoo#130867

Related: odoo/design-themes#685
Related: odoo/enterprise#45271
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-07 10:58:48 +02:00
kais-odoo 32dec19ee0 [FIX] web,project: fixes groupby attribute in pivot _getEmptyGroupLabel
Before this commit, since we used to show custom label for project and assignees
as 'private' and 'unassigned' section in pivot view,  if we want to display show
custom label for groupby with sub group type we might get confuse with passing
'groupby' attribute on _getEmptyGroupLabel pivot method.

In this commit, fixes groupby issue by passing 'fieldname' instead of 'groupby'
cause groupby contains 'groupname : subgroup' like 'deadline : year'.

closes odoo/odoo#130960

Task: 3186578
X-original-commit: cae3531deb032289f5f823df7ffa565ee89189ea
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-05 12:20:31 +02:00
Aaron Bohy 435834915e [REF] web, website: move initAutoMoreMenu to website
There's a single usecase left for this helper, which is in website.
This commit directly moves the function definition in the file
using it.

Part of task~3439226

closes odoo/odoo#130843

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-04 16:34:51 +02:00
Aaron Bohy 8c510e9223 [REF] web,website_slides: remove legacy BrowserDetection
This module was no longer used.

Part of task~3439226

Part-of: odoo/odoo#130843
2023-08-04 16:34:50 +02:00
Aaron Bohy 6774530101 [REF] web,*: remove KeyboardNavigationMixin from website
This mixin was still applied on the RootWidget but was useless
since the website relies on the hotkey service [1].

This commit ends the life of the frontend_legacy asset.

[1] https://github.com/odoo/odoo/commit/daf5963845a8dda4d669e512a4ef6dcfebdd8813#diff-fe005825c9360edbc616517111aa67926161221c42003cad29f88a0214cd909eR13

Part of task~3439226

Part-of: odoo/odoo#130843
2023-08-04 16:34:50 +02:00
Aaron Bohy 20eb303cfd [REF] web: remove unused template
The Widget using it has already been removed, but it looks like we
forgot to remove its template.

Part of task~3439226

Part-of: odoo/odoo#130843
2023-08-04 16:34:50 +02:00
Jorge Pinna Puissant 8a89676f2c [FIX] web: renderToElement should always returns an element
Before this commit, when the first element of a template is a non
fulfilled condition :
'<t t-if="false"/>'
The function renderToElement returns an empty text. This occurs because
it returns the first child, which in this case is an empty text.

Now, the function returns the first element.

closes odoo/odoo#130858

X-original-commit: 8dabc4e1d5ebd94f6a315ce56b9bf60240dd7fdd
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-04 15:02:42 +02:00
Pierre Paridans 3fd016a443 [IMP] web,survey,website_slides: remove unused jQuery Form plugin
None of the main methods provided by this plugin were stil used; only
the internal method `enable()`.

This commit replaces these calls by toggling the `disabled` HTML
attribute.

closes odoo/odoo#130817

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-08-04 15:02:27 +02:00
Pierre Paridans d6edddb216 [IMP] web,point_of_sale,website_slides: remove legacy daterangepicker
Note: the "event_tour" stil has step targetting the .daterangepicker
selector... but as this tour is broken since (at least) 14.0, its fix
will be tackled in another PR.

closes odoo/odoo#129993

Related: odoo/enterprise#44742
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-08-04 13:42:00 +02:00
Aaron Bohy 8a787f1866 [REF] web,web_editor: move SmoothScrollOnDrag to editor
This commit moves the smooth scroll on drag helper from web to
web_editor, which allows us to move it from frontend and common
assets to web_editor.assets_legacy_wysiwyg which is only loaded
in the website editor, the only place where it is used.

Note that it uses legacy Class and mixins, so it still needs to be
converted to the modern codebase, alongside editor snippets.

Part of task~3439226

closes odoo/odoo#130813

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-04 12:21:58 +02:00
Pierre Paridans 690e184dd2 [IMP] web,website_slides: removes placeholder attribute polyfill
Mainly used for Internet Explorer support (cf. placeholder attribute is
supported since IE 10).

We are in 2023...

closes odoo/odoo#130692

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-08-04 10:59:16 +02:00
stefanorigano (SRI) c9dc3409dc [IMP] web: o_searchview_facet interaction design
This commit enhances the o_searchview_facet design with hover
interactions, focusing on providing a clearer visual representation when
facets are selected:

- Implemented an overlay to indicate when a facet is selected, similar
  to https://github.com/odoo/odoo/pull/129991.
- Replaced the facet's icon with a cog icon, serving as a visual cue
  that the domain is now editable, improving user understanding.
- Overall appearance improvements, resulting in a more polished and
  user-friendly design.

task-3444675

closes odoo/odoo#130017

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-08-04 10:59:09 +02:00
Aaron Bohy 850427e4ba [REF] web,mail: remove legacy MockServer and related utils
This commit removes the legacy implementation of the MockServer
and test utils making it available in the test environment (e.g.
addMockEnvironment).

Part of task~3439226

closes odoo/odoo#130671

Related: odoo/enterprise#45141
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-08-04 09:43:08 +02:00
FrancoisGe 41750141c2 [FIX] web: drag and drop kanban flicker
Before this commit, in a kanban view, if you resequence records or
groups by dragging and dropping, there is a flicker.

How to reproduce:
- Go to a kanban view
- Drag and drop a kanban card

Before this commit:
    The moved kanban card returns to its previous position during a render.

After this commit:
    The kanban card keeps its new position.

closes odoo/odoo#130561

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-04 09:42:58 +02:00
tong-odoo 24edd423dd [FIX] web: list.binary field should show filename
Steps to reproduce:

- Make any list binary field with filename attribute

Current behaviour:

- The binary file does not use the filename field

Expected behaviour:

- The binary file should use the filename field

Explanation:

After the updates of list-specific binary field [1], the list
binary cannot get the attributes field name of the record anymore.

[1] odoo/odoo#129631

closes odoo/odoo#130719

X-original-commit: ddfa65782a8ff59c07adcb8c56797c57a06789a0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-03 19:31:59 +02:00
MerlinGuillaume d8848e0147 [FIX] web: limit the width of the filter field selector
If we use a long enough sequence of field in a custom search filter, the
sequence of fields will overlap the operator or value

Steps to reproduce:
1. Open any view with a search
2. Add a custom filter
3. Use enough related fields in the filter so that it creates a long
   sequence of fields, it will overlap the operator at one point

Solution:
Limit the width of the `o_model_field_selector_value` class and break
its content

opw-3450099

closes odoo/odoo#130675

X-original-commit: 472923933e145b39f995051ebe8b45a75669a707
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-08-03 19:31:52 +02:00
Antoine (anso) 46363b1dc0 [FIX] web: form statusbar margin
Prior this commit, there was an undesirable margin under
`.o_form_statusbar` when on mobile

part of task-3355071

Forward-port-of: https://github.com/odoo/odoo/pull/126646
Part-of: odoo/odoo#130616
2023-08-03 19:31:35 +02:00
Aaron Bohy 3fac03b7f4 [REF] web,*: remove legacy Domain, Context and pyjs
This commit removes the legacy implementations of Domain, Context
and the pyjs library. All of them exist in the new codebase, and
the few pieces of code that were still using the legacy ones have
been adapted.

Part of task~3439226

closes odoo/odoo#130647

Related: odoo/enterprise#45129
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-03 18:02:55 +02:00
Jérémy Hennecart (jeh) 2c11e734f8 [FIX] web: fix empty html field
Markup("") on a HTML field should be counted as an empty field.
Check now the length of the value and assign false for HTML field
if we have an empty string inside markup.
This was leading to an issue where empty alert message were displayed
based on computed HTML field.

closes odoo/odoo#130479

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-03 10:43:15 +02:00
Aaron Bohy f31214aeaa [REF] web,*: remove legacy fields
Those fields are no longer used since all client actions and the
studio report editor have been converted to owl.

Part of task~3439226

closes odoo/odoo#130462

Related: odoo/enterprise#45015
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-03 09:23:21 +02:00
Géry Debongnie 7c748bbcbe [IMP] web: update owl from 2.2.3 to 2.2.4
Release notes:
https://github.com/odoo/owl/releases

Commits:
[FIX] compiler: fix swapped key/value using t-foreach on Map
[FIX] devtools: fix crash while highlighting env
[FIX] *: move OwlError to common
[FIX] playground: todo app clear complete tasks
[IMP] compiler: improve error message when failing to compile template

closes odoo/odoo#130547

X-original-commit: b8346973103b6d927c98c97179878769c0784ce8
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-02 17:29:42 +02:00
Maximilien (malb) e3f4651c52 [FIX] * : Display improvement
This PR will introduce multiple display improvements. Here is the list:

- In the accounting settings, the fiscal localization section has a button that
was oddly placed. This PR solves that issue.

- On the dashboard, when clicking the three dots on a card, the options "remove
from favorites" and "configuration" were not aligned.

- In ir_attachment, the label and field of "datas" will be aligned, and a gap
will be added between the icons.

- In the settings, the button links were inconsistent in terms of padding. This
PR resolves that.

- In the payment providers, two button links had text wrapping issues. By adding
 Bootstrap classes, this has been resolved.

closes odoo/odoo#130522

Task-id: 3342969
X-original-commit: d4ba0c1f69212bfb0030036951c2888e935bbdf0
Related: odoo/enterprise#45060
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-08-02 17:29:27 +02:00
Michael (mcm) 9d6b380a24 [REF] *: adapt patches after new patch function
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.

task 3410198

[1]: 19ea1ac08043e22a811630968e44715cc3bfc495

Part-of: odoo/odoo#125716
2023-08-02 17:29:05 +02:00
Michael (mcm) 04fddc19d4 [IMP] web: improve patch function
This commit refactors the patch function in order to simplify its code
but also and most of all remove the `this._super` bound on each patched
method call.
The patch function now supports the javascript keyword `super` to
get the parent's property.
This removes constraints we had with `this._super`. We had to create a
rather complicated intermediate function to bind `this._super` and this
function was called each time before we called a patched method.
It was annoying for debugging but necessary. Because of this
intermediate function `this._super` was also had to re-bind each time
we entered a patched method which was annoying with async method, we
had to save the parent method in the patch before awaiting its
execution. Finally, not a big issue but still, objects could not have a
`_super` property as it would be hidden in the patch.

task 3410198

Part-of: odoo/odoo#125716
2023-08-02 17:29:05 +02:00
stefanorigano (SRI) 330ed0bfb5 [FIX] web: tagsList, enhanced edition
This commit focuses on fixing the UX for managing avatars and badges
within `tagsList` in edition mode. The changes include:

For Avatars:

- Implemented an overlay effect on :hover, making it clearer which entry
  is currently selected, providing a visual cue for users.
- The "remove" button now appears on :hover only, reducing visual
  clutter and improving visual scanning.

For Badges:

- Added visual feedback when hovering the "remove" button, making it
  more apparent and user-friendly.

task-3439555
part of task-3326263

closes odoo/odoo#130485

X-original-commit: 649a58cd88c4d74cdd62f47c1c0c354ced143481
Related: odoo/enterprise#45028
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-08-02 16:00:46 +02:00
FrancoisGe ce774f1322 [FIX] web: complete x2m activeField
The goal of this commit is to complete the list of activeFields for
an x2many in list mode when a record is opened with the fields present
in its form view. This ensures that there is always an activeField
for all the data in a record. Before this commit, when the x2many's
form view was not inline, when the form view was closed, the fields
not present in the list view no longer had an activeField, which could
cause crashes.

closes odoo/odoo#130453

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-02 16:00:01 +02:00
Didier (did) 93f134d640 [FIX] im_livechat: reintroduce history command
task-3435244

closes odoo/odoo#130362

X-original-commit: 2e834a8439cc260c25d95233492df13e9b77c2de
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-02 13:20:34 +02:00
Jorge Pinna Puissant fa5c70d61d [REF] web: RelationalModel: unity always return an object for many2one
Before this commit, in some cases (many2one invisible) unity returned
an integer as value.

Now, to be consistent, unity always return an object for many2one.

Note that, web_read_group still returns an array as value for many2one.

part-of task-id~3179751

closes odoo/odoo#130340

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-02 13:20:30 +02:00
tsm-odoo 7b88ae4760 [FIX] mail, *: start bus service lazily
*: im_livechat, web.

Since [1] the messaging service is added to the livechat embed
bundle. As a consequence, the bus service is started even when
it is not needed. This is wrong since it would lead to lots of
useless connections to be made.

This PR prevent mail services from starting the bus eagerly in
this context and adds a tour in order to prevent further errors
on this matter.

closes odoo/odoo#130059

X-original-commit: b2bcef3c3b57061ef0694a5fc3c326cc8babc818
Related: odoo/enterprise#44782
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-02 13:20:11 +02:00
Julien Carion (juca) 6da48dbc95 [IMP] web: add show weekends to calendar
This commit adds the "show weekends" functionality to calendar which
allows the user to choose whether weekends should be shown in the calendar
or not (defaults to false).

task-3425523

closes odoo/odoo#129107

Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-02 13:20:07 +02:00
MerlinGuillaume 86399fc785 [FIX] web: ignore incorrect Safari errors
Steps to reproduce: (on Safari only)
1. Install Email Marketing and Mass mailing on sale orders
2. Open Email Marketing and try to open 'Our last promotions, just for
   you!'
3. An error is thrown

Solution:
Ignore errors raised in Safari

Problem:
Error "ResizeObserver loop completed with undelivered notifications." is
raised by the ResizeObserver in
`mailing_mailing_view_form_full_width.js`. However in Safari (and
desipte the ResizeObserver flow being exactly the same than in other
browsers), the error message is "Script error." so we are not able to
correctly discard it in the error listener of `error_service.js`

opw-3339673

closes odoo/odoo#130389

X-original-commit: d00144d1198131ba7c68466b514518ca056ceef0
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-08-02 06:18:32 +02:00
Samuel Degueldre c4b7d65e2e [FIX] web: stop leaking event listeners on EventBus in QUnit suite
In odoo/odoo#120893, the mail team changed their test utils so that they
would always start all services. This can cause issues because services
do not have any built-in destruction/cleanup mechanism, as in a
production application they are only supposed to be started once. Some
services add event listeners on global objects, in particular, the
tour service adds an event listener on the tour registry which is
global. If this event listener is not cleaned up, every time the tour
service is started, a reference to the environment in which this tour
service is being started is leaked. Since the environment contains all
started services, it is typically a pretty heavy object, especially
since in this context, all services are started instead of a select
subset.

This commit fixes that by patching the EventBus class to automatically
remove event listeners that were added on an event bus after the test,
in a similar fashion to what we do for some global objects like window
or the document's body.

closes odoo/odoo#130373

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-02 06:18:09 +02:00
Aaron Bohy c10b5d0b1b [REF] web,*: tests: remove legacyExtraNextTick
Now that most of the webclient codebase (fields, views, client
actions...) has been converted to owl, the legacy extra next tick
used in a lot of tests is no longer necessary. This commit removes
the helper and its usage. At some places, a real tick was needed,
but we didn't see it because of the use of the legacy extra next
tick.

Part of task~3439226

closes odoo/odoo#130236

Related: odoo/enterprise#44869
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-01 23:52:30 +02:00
Géry Debongnie 600bd9c81f [IMP] web: only display technical tooltips if debug is set in url
This commit aims to minimize a very annoying issue that comes up
frequently: it is often necessary to go in debug mode to configure odoo
for a demo. Then, if we don't explicitely remove debug mode, it will
persist (because it is stored in the session). As a result, technical
tooltips will be visible during the demo, which may be distracting and
give a bad impression, because these tooltips are designed to provide a
lot of technical information.

It is not clear how we could solve the problem. Many questions arise
when discussing the issue:
- splitting technical and debug mode
- removing debug mode from the session
- but still making sure tests works
- what information should be displayed in ui?
- if debug mode is not persistant, find a way to make it temporarily
active

There are a lot of different opinions and needs that are not easily
solved.  This commit does not pretend to solve them, it is just a quick
way to reduce the issue mentioned above, by changing the JS code to only
use debug mode if it is explicitely set from the url.

Concretely, it means that the "js" specific debug features are
configured only with the debug parameter in the url:
- technical tooltips
- owl props validation
- displaying the debug menu

The rest will keep working as before:
- debug=assets
- debug=tests
- additional menu items/fields

Again, this commit is just a quick fix, until someone can find a spec
that get enough traction.

closes odoo/odoo#130060

Taskid: #3255925
X-original-commit: 59f49d6a8c856a5d8ca28dcfd7840baaa1c7672f
Related: odoo/enterprise#44783
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-08-01 17:56:45 +02:00
Pierre Pulinckx (pipu) 60fe2e9b17 [REF] *: remove _lt()
In a previous commit 8bfa76a, _lt() returns _t().
So, in this commit, all usages of _lt() are replaced by _t().

task-3292454

closes odoo/odoo#130179

Related: odoo/enterprise#44906
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-01 13:51:17 +02:00
Aaron Bohy 9ed6036861 [REF] web: RelationalModel: add option to display invalid notif
This commit removes a function from the Record datapoint, and
replaces it by an option to checkValidity, as we want Record to
have a few public methods as possible.

Part of task~3179751

closes odoo/odoo#130170

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-01 10:55:51 +02:00
FrancoisGe 6424edb254 [FIX] *: convert record.data.id => record.resId
Since the relational model was rewritten (PR 114024), the record id is
no longer present in data by default. The correct way to access the id of
a record is to do record.resId.

closes odoo/odoo#130061

Related: odoo/enterprise#44785
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-01 07:04:57 +02:00
FrancoisGe 9d2656720c [REF] *: remove model.notify()
Since the relational model was rewritten (PR 114024), it is now reactive,
so it is no longer necessary to use model.notify() to render the view.

closes odoo/odoo#130058

Related: odoo/enterprise#44781
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-31 23:21:18 +02:00
Samuel Degueldre 8f68a146bf [IMP] web: check for undesirable module dependencies
Previously, we have accidentally made some core modules depend on some
modules outside of the core folder (eg views), this is undesirable as it
can make assets bundle hard to write using globs, and can make it easy
to introduce circular dependencies, it also doesn't make sense from a
code-organisation perspective.

This commit introduces a QUnit test that checks the modules in some
folders only depend on other whitelisted folders.

closes odoo/odoo#129982

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-31 20:54:01 +02:00
Pierre Rousseau 036307ba26 [REM] web, *: remove legacy dialog
OwlDialog is not used anymore, therefor we can remove it.

Task-id 3439226

closes odoo/odoo#129774

Related: odoo/enterprise#44634
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-31 19:02:58 +02:00