Commit Graph
14312 Commits
Author SHA1 Message Date
Simon Genin 063e38c4fd [IMP] web,mail: add resetLocalState to rendererWrapper
add resetLocalState method to rendererWrapper and test activity view is not
crashed on on_destroy_callback

task-2466057

closes odoo/odoo#73022

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-02 12:48:52 +00:00
Mohammed Shekha afa4ac684d [FIX] web: reset renderer local state when switching view
before this commit: when switching to form view from listview using Create
button and then activate some other tab and Discard that record which will
move back user to list view now again clicking Create button opens form view
but active tab is last activated form tab instead of first one, this is because
of local state is not cleared.

after this commit: when form view is switched back to list view using Discard
button, local state will be cleared, here we are explicitly removing 'active'
class from all tab and pages of all notebooks.

task-2466057

X-original-commit: ff0e5694e28a46287dc54ab440364e11e8e9c832
2021-07-02 12:48:45 +00:00
Francois (fge) 1e5a0dfc0a [FIX] web: display shortcuts correctly on the command palette
closes odoo/odoo#73048

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-01 11:37:45 +00:00
Hardik PrajapatiandMohammed Shekha 157b40ad5c [FIX] web: traceback on removing a groupby in editable list
Currently, a traceback is generated on removing a groupby when line is in edit
mode in groupable list view. It happens because the facet removal and window
click both are called at the same time.

This commit fixes the issue by ignoring the window click on removing the search
facet.

TaskID-2518527
closes #70236

closes odoo/odoo#73102

X-original-commit: da51bd7ef270fe5a481b937f0a3c296d0eea196c
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2021-07-01 17:00:13 +00:00
Bruno Boi 3bbfd1582b [FIX] web: do not open multiple groupBys submenus at once in pivot dropdowns
Introduced with odoo/odoo@5c5924af88

closes odoo/odoo#73076

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-01 12:55:25 +00:00
Andrea Grazioso (agr-odoo) d81875491c [FIX] web: filter out non-exportable fields
Go to User list
With studio add column User type
export

Traceback will occur because the special field sel_groups_*
should not be exported

opw-2565911

closes odoo/odoo#72861

X-original-commit: 196fe4c0be19310964b41da3b8a113f6d81aed6e
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-06-28 11:14:44 +00:00
Romain Tartière bac1f99312 [FIX] web: Adjust label#for to match input#id
The #for attribute of the LABEL tag should match the #id of the INPUT
tag, not it's #name.

This regression was introduced in a171694644

closes odoo/odoo#73052

X-original-commit: 979c9d71aee4b1bb6c8798bdfdbf69ac8af3fa69
Signed-off-by: Romain Tartière <romain@vittoriaconseil.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-01 09:05:16 +00:00
Mohammed Shekha 3212737a25 [FIX] web: color picker in readonly show default cursor
before this commit: when user is in readonly form, hovering on color picker
widget show cursor pointer due to which user has impression that it can be
edited while color picker should display default cursor in readonly form.

after this commit: in readonly form color picker widget will display default
cursor while hovering over color.

task-2326198

closes odoo/odoo#73011

X-original-commit: a7663fd5c0bf9f09dbb7fa472b1cb0ef3aa47930
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-06-30 16:27:44 +00:00
abd-msyukyu-odoo f69fa7af8c [IMP] web: add hover description for kanban progressbar sum field
This commit adds a sum field description when hovering the quantity at the end
of a progressbar. The description is the label (translated string
representation) of the field used for the sum.

Task-ID: 2243913
PR odoo/odoo#69380
2021-06-30 09:51:42 +00:00
abd-msyukyu-odoo eed1e64a93 [IMP] core, web: add a range for date(time) read_group
1. Objective

  - We are in a Kanban view, and we group by a "date/datetime" field.

  - In order to "quick create" a record in a group, or to "drag & drop" a
    record between 2 groups, we need a default value for this date field.

  - In this case, a group represents a "range" of dates. A default value could
    be the last date of this range.

  - Prior to this commit, the view had only access to a display string for this
    date range. We want to have access to the concrete bounds (start/end dates)

  - Since some date/datetime fields have backend constraints, it would be
    difficult to generate a compliant global default value. As such, the use of
    the default value should be disabled by default and activated on a field by
    field basis.

2. Usage

  - Use the last day (for dates), or second (for datetimes) of the range to set
    a default value in kanban "quick create" and "drag & drop"

  - Use the end of the range of the last group from a read_group to be able to
    request the next group (chronological order) in subsequent read_group calls

3. What are the changes in this commit

  - read_group from the "core" "models.py", with the added __range for
    date(time) fields, a dictionary for each group. The keys are the field
    names and the values are a dictionary with the following keys: value:
    - from: starting date(time) of the range (inclusive)
    - to:   ending date(time) of the range (exclusive)

  - XML changes:

    - with a new xml attribute on <field> tag allow_group_range_value (for the
      kanban view):

      - we allow (or disallow) supported non-readonly fields to be:
        - draggable
        - quick created

      - this attribute can be used only on date(time) fields, and if not set,
        the default behavior is false

      - the naming is subject to contention because it relates to
        different features. The relation comes from the constraint:
        To perform a drag&drop or a quickCreate, we must be able to get the
        value from the group containing the record.

  - JS changes:

    - we add "group.range" after a read_group for date fields, which is a
      dictionary: {field_name: {from, to}}, for each date(time) groupby field

    - since date(time) fields can use the format "date_field:granularity" when
      used in a groupby, we have to properly split out the granularity to ensure
      compatibility with the code previously in place (drag&drop procedures)

    - update mock_server and sample_server to make use of the date range.
      Adding support for datetime grouping to both mock and sample servers, for
      tests and previews.

    - the default value for kanban drag&drop and quickCreate features is the
      last day/second of the range for date/datetime fields

4. Why can't this range be computed from the original display value with
  moment.js

The Babel python library that we use for date(time) formatting (2.6.0) is kept
at the same version as the package in stable Debian Linux. This version has
some issues with displaying weeks consistently around the new year in certain
locales.

We cannot reverse compute a date(time) label with moment.js to get a range since
nothing guarantees that the range will be the same one that Babel used to
output it.

5. read_group return format discussion

Prior to this commit, the format of the value for the groupBy field was
either :

  - String : used as a display value for the group.
    Most notably, for date and datetime, this value cannot be used as a field
    value in most cases. It would be more practical to also return the date
    range along with the display value, so that Drag&Drop and QuickCreate
    functionalities can be properly enabled in views
    example :
      "March 2021" has the range ['&', (field, '>=', 2021-03-01),
        (field, '<', 2021-04-01)]
      This information is lost at the end of the read_group.

  - Array : used to indicate a res_id in case of a many2one field
    res_id = array[0]
    field_diplay_value = array[1]

Since we cannot use the array format to send the date(time)s of the period range
because it could be confused with the many2one format, this commit introduces
the use of a new `__range` key which is a dictionary with specific related
keys to be used to defer usable data to the web client.

Task-ID: 2243913
PR odoo/odoo#69380
2021-06-30 09:51:42 +00:00
Aaron Bohy 88340cc2fb [FIX] web: debug: allow to edit SearchView
Before this commit, clicking on "Edit ControlPanelView" in the
debug manager actually edited the "main" view (e.g. kanban), because
we used the wrong view id.

This commit also renames "Edit ControlPanelView" into "Edit
SearchView", which is more accurate w.r.t. to the view type.

closes odoo/odoo#72995

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-06-30 12:59:54 +00:00
Ivan Yelizariev 0249f87ed0 [FIX] web: prevent selecting element from html field
html field allows to insert html structures that can be treated as elements of
odoo web client. This patch updates setLocalState method (part of the web
client) to check if an element is inside html field, so such elements will be
ignored

---

opw-2520403

closes odoo/odoo#72877

X-original-commit: d2733da4863bd03b0cf853355596a44e901405d2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-06-28 14:17:07 +00:00
Xavier Morel 6cfc265944 [FIX] web: typo in test's attr key
Does not really seem used by the test so probably not much of an issue
either way.
2021-06-29 05:34:17 +00:00
Xavier Morel 03772ac07a [IMP] web: use testUtils in tests
Seems like a better idea than doing it by hand? IDK.
2021-06-29 05:34:17 +00:00
Xavier Morel 32062a3bbb [FIX] board, bus, web: replace deprecated test-utils calls
A number of functions from `web.test_utils` have been deprecated at
the module root and should be called through submodules.

Fix a bunch of remaining cases. Also add a few missing `await`s on
`triggerMouseEvent` calls. Don't bother rewriting the imports in
unpacking style as for most updating the imports is unnecessary. Do so
for `field_one2many_tests.js` where we have to rewrite the imports
anyway:

* recursively import controlPanel, createView, mock.patch and
  mock.unpatch
* remove the aliasing of controlPanel to cpHelpers
2021-06-29 05:34:17 +00:00
Xavier Morel 7d90cfac55 [FIX] web: SearchPanel warnings
Can't have a searchpanel with both:

* a filter (`field[@select='multi']`) with a `@domain`
* *and* a category (`field[not(@select='multi')]`) with `@enable_counters`

That specific case will trigger a warning and the counters being
disabled. Fix them. Oddly enough the only cases seem to be in tests...
2021-06-29 05:34:17 +00:00
Xavier Morel b39c5072f7 [FIX] web: avoid warning during qweb tests
One of the qweb tests checks that in a t-set @t-value takes priority
over body contents. However this construct also triggers a warning
when invoked.

Mock out `window.console` during qweb tests, this suppresses that
warning.
2021-06-29 05:34:17 +00:00
Xavier Morel de5aceb88e [IMP] web: test reliability
This test sometimes fails locally.

Updating it to be a bit more modern also seems to make it more
reliable (also moved the delay between the drag & drop operation & the
steps checking as it seems more logical, but the reliability issues
had disappeared before that).
2021-06-29 05:34:16 +00:00
Xavier Morel 3985edd5da [FIX] web: missing action id warnings
* Add test name when logging missing action ids, makes finding out
  which test causes the issue much simpler.
* Suppress the warning emission in the one remaining test which
  triggers it, as testing invalid action IDs is exactly the purpose of
  the test.
2021-06-29 05:34:16 +00:00
Xavier Morel 1e6de40b78 [IMP] web: downgrade warning messages to info
Two internal warnings are features which literally are not (entirely)
implemented, the tests can't be fixed to avoid them. Also augmented
the log messages with which test triggered the log, as it's very hard
to debug the issue otherwise.

As for the qweb debug mode warning, there's no way to disable it
easily because multiple tours explicitly opt into debug mode (with
good reasons), so it's not enough to just bypass the `mode` setter in
the test setup helpers (test_main in POS and main_tests in web), there
would also need to be special workarounds in the 4 modules which set
`owl.config.mode` based on the session's debug mode.

I don't know that this warning is even useful, it defaults to `false`
so the only situation in which this would be relevant would be for a
third-party to use Owl *and* explicitly enable the debug mode *and*
forget to remove it when deploying to production *and* look at their
console.
2021-06-29 05:34:16 +00:00
Xavier Morel 053285afdc [FIX] web: momentjs warnings
* Without an explicit format string, moment() should be called with
  ISO date(times).
* Correctly destroy all test locales (`zz` was not destroyed at all,
  and `englishForTest` was double-destroyed instead of destroying
  `frenchForTests`).
* Avoid creating a moment object from the value `false` in date(time)
  fields.
* Disable the warning entirely in dates_tests, the contents are super
  messy and weird.
2021-06-29 05:34:16 +00:00
Xavier Morel 29de1ef72b [IMP] web: reduce warning spam, only show rpc error warning in debug
Trigger a *lot* of spam while running tests

It's not great that this is now disabled:

* some cases are mistakes in the test e.g. RPC not properly setup,
  they should really be fixed
* others are literally testing error responses, the logging should be
  suppressed instead

Ideal scenario would probably be to upgrade this to `error` and have
an API of some sort to suppress it on a per-test basis (not unlike
`@mute_logger` on the Python side).
2021-06-29 05:34:16 +00:00
Xavier Morel 9528fd350f [FIX] qunit: suppress ResizeObserver error
The error is (apparently) benign and already suppressed in some parts
of the system, however it can (apparently) trigger locally during some
tests, causing the test to fail as the error is caught and converted
to a failure by QUnit.

Sadly QUnit does not offer a proper hook for this, so it has to be
suppressed by wrapping the existing handler and only calling it for
other errors.
2021-06-29 05:34:16 +00:00
Xavier Morel c6855cdcf8 [IMP] qunit: avoid splitting console.error calls
The Chrome runner may only show the first one, which may or may not be
useful on its own.
2021-06-29 05:34:16 +00:00
Mohammed Shekha 6246bddba4 [FIX] web: calendar sidebar name cropped
Before this commit: calendar view sidebar filter names were getting cropped
at bottom, it is because of line-height property which is set to 1.

After this commit: calendar view sidebar filter names will not be cropped
as line-height property set to 1.5.

task-2519813

closes odoo/odoo#72898

X-original-commit: 4e24df71f34f0306447f724fd5028778fdf46428
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-06-28 17:14:20 +00:00
Yannick Tivisse a223bc66d1 [IMP] web: Hide empty pills if empty 2021-06-28 14:39:44 +00:00
Francois (fge) f92bd09244 [IMP] web: add shortcuts access from the command palette
This commit adds the possibility to use a shortcut from the command
palette. When a shortcut is called from the command palette, the palette
will be close and the action related to the shortcut will be apply.

closes odoo/odoo#72831

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-06-28 12:06:26 +00:00
Francois (fge) a7984f484b [FIX] web: properly display reference field in editable form view
Since a recent commit[1], many2one field was improved, and the inner components
are now wrapped within a newly introduced div `o_field_many2one_selection`.

Reference field extends many2one field and due to newly introduced wrapper div,
few editable form view related css rules (mainly for `o_row`) were broken and
the referece field was a mess in editable form view.

This commit fixes the issue by adding reference field specific rules that
restores the UI in the editable form view.

This commit fixes the issue by adding the class "o_row"
on the <div class='.o_field_many2one_selection'>  containing the <select>
and the <input>.

commit[1] - 288b24c

TaskID-2453138

closes odoo/odoo#72833

X-original-commit: 1f14652aca91763caf271c248c7576978671cfca
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-28 08:27:12 +00:00
Lucas Perais (lpe) 574739e125 [FIX] web: legacy: CustomFilterMenu is focusable
Before this commit, when browsing a filterMenu with the keyboard, the CustomFilterMenu
was not focusable. This is because its root node changed from `button` to `span` which is not
focusable by default.

After this commit, the CustomFilterMenu is focusable and the root node has been replaced back by a button

closes odoo/odoo#72738

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-06-25 15:25:50 +00:00
Yograj Tandel d7b2457331 [IMP] web: color picker adjustment
Before this commit: on smaller screens, in color field, colors are not display
in one line, few colors are coming on second line.

After this commit: colors are now displaying in one line by reducing margin
between color squares.

task-2454346

closes odoo/odoo#66915

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-06-25 13:23:41 +00:00
Leonardo Pavan Rocha bc40795c56 [IMP] base: base layout designer improvements
This commit implements improvements in the layout designer, such as addition of a new custom background, adds custom report footer and company details.

task-2355704

closes odoo/odoo#66860

Related: odoo/upgrade#2275
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-06-25 10:33:31 +00:00
Mohammed Shekha ae4cb866de [FIX] web: do not display notebook ul element if all pages hidden
before this commit: if all pages are hidden then notebook ul was still visible
due to which border for notebook ul element was displayed.

after this commit: if all pages are hidden then we hides notebook ul element
as well, so that we don't have empty border line of empty notebook.

task-2411651

closes odoo/odoo#63420

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-06-25 07:28:47 +00:00
prro-odoo 2956233255 [FIX] web: expand import-compatible fields
- Install the eCommerce (for the ribbon, in 14.0) and the Sales app
- Go to the Sales app -> Products -> Products
- (View List ->) select (a) Product(s) -> Action -> Export
- check "I want to update data (import-compatible export)" -> click on the "Ribbon" field (in 14.0, or another many2x field for wich the model has no _rec_name defined) to expand

Cause: the export page controller tries to access an undefined field (_rec_name)

Solution: the controller now uses a fallback method to retrieve the wanted field

opw-2566403

closes odoo/odoo#72748

X-original-commit: e31cb5be22de7db223318b4876bf725e15654fea
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: prro-odoo <proose@users.noreply.github.com>
2021-06-24 17:30:20 +00:00
Anh Thao Pham (pta) fed1acee10 [FIX] web: fix error when getting image URL with default id
Linked to commit: https://github.com/odoo/odoo/commit/7eac23573c77415c84cb9c234c8063d4c68be425

Using false as default value instead of null will lead to the following
error if we try to get image URL of a record that is not the current one
and if no placeholder is available:
ValueError: invalid literal for int() with base 10: 'false'

opw-2516188

closes odoo/odoo#72729

X-original-commit: d32c0ddbcb99385407a5030e8d3ea4df44509377
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-06-24 15:01:47 +00:00
Lucas Perais (lpe) ac0224319e [FIX] web: utils/strings: sprintf support lazy translated strings
Have something like:
```js

sprintf("my string %s", _lt("lazy translated"));

```
Before this commit, the lazy translated term was not formatted into the string.
This was because _lt returns an object containing a custom toString function, which was not handled by sprintf

After this commit, sprintf is able to handle lazy translated strings

closes odoo/odoo#72598

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-06-24 09:59:05 +00:00
Géry Debongnie d4bbadd699 [REF] web: slightly improve translation system
Before this commit, "lazy translated" strings were implemented as
objects with a toString function. This is simple, but does not emulate
very well the real behaviour of a string.

In this commit, we create a LazyTranslatedSTring class which subclass
the String class, so all string methods will work as expected.

We also expose the _t function here, to make it more convenient for some
code to access the translations instead of depending on the presence of
an environment.
2021-06-24 09:40:10 +00:00
Bruno BoiandStefano Rigano 5c5924af88 [FIX] web: change pivot dropdown submenu
Since odoo/odoo@1971bf3 the customised dropdown in the pivot view (the one that opens its submenus horizontally) cannot open at all its submenus.

As the correct behaviour cannot be restored without reintroducing the +300 scss lines that has been removed, this commit applies a temporary fix that *changes* the design of this dropdown. Now, its submenus will open vertically, like for the groupby menu near the search bar.

The final dropdowns design is currently ongoing within the taskid: 2578926

closes odoo/odoo#72640

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
2021-06-24 07:14:49 +00:00
Lucas Perais (lpe) c00fb3cede [FIX] web: register template of dynamic classes once
Before this commit, the template of some dynamic classes (usually as WOWL to legacyAdapters)
were registered at each definition of the class which is potentially at every doAction/switchView

After this commit, they are all registered only once, as early as possible.

closes odoo/odoo#72476

Related: odoo/enterprise#19199
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-06-23 15:47:56 +00:00
Lucas Perais (lpe) 4e37b0bab0 [FIX] web: navbar: do not change url hash on item clicked
Before this commit, when clicking on menus or debug items or use menu items
the URL briefly changed pushing an unwanted history entry.

We do want those to be links (tag `a`) with an href to be able to open in a new tab.
But we don't want the current url hash to change because of it.

This commit fixes this.
2021-06-23 15:47:56 +00:00
Lucas Perais (lpe) 0cec54b92c [FIX] web: action_service: better error handling
on a legacy form view, do an action in target new
The view in target new should, during its onchange, trigger a ValidationError

Before this commit, the dialog_container was stuck in an error loop.
This was because the received error was never an instance of Error, rather it was
a legacy error event. So it was never transmitted upstream were the ErrorHandler could remove
the dialog in error from is dialog array.

After this commit, the ValidationError mesage is displayed.

This commit additionally fixes another issue:
An action in target main that failed to render erased the whole DOM. This is not what we want,
at least for now. Imagine a list view, open a record, this record fails to load. We still want to be
on the list view, not in a blank state.
2021-06-23 15:47:56 +00:00
Lucas Perais (lpe) a2d49d3003 [FIX] web: error_service: bind the event handlers on browser
Before this commit, the error service bound its listeners onto window.
This may create pollution when executing more than one test instanciating an error_service

After this commit, we bind the handlers onto browser, which is fully in our control in tests.
2021-06-23 15:47:55 +00:00
Lucas Perais (lpe) 77a59f8d6a [FIX] web: action_service: do not commit a dialog that has failed
Open a action in target new that you'll know will fail to open.
Make sure you put an onClose callback when executing doAction.

Open another action in target new, that will succeed.

Before this commit, the onClose of the first dialog is executed, while it should not.
Indeed, if the dialog fails, the whole business flow is invalid altogether
and no more business operation (in the onClose) should be executed

After this commit, the onClose callback of the failing dialog is not executed.
2021-06-23 15:47:55 +00:00
Arnaud Joset 4e006fb831 [FIX] web: prevent traceback during calendar popover processing
Before this commit, a traceback would occurs in sale_management calendar view when the user would try to display the popover of a sale_order.

```js
basic_model.js:2399 Uncaught (in promise) Error: for modifier "readonly": Unknown field state in domain
    at Class._evalModifiers (basic_model.js:2399)
    at calendar_popover.js:203
    at Function._.each._.forEach (underscore.js:145)
    at calendar_popover.js:180
    at async Promise.all (index 1)
_evalModifiers @ basic_model.js:2399
(anonymous) @ calendar_popover.js:203
_.each._.forEach @ underscore.js:145
(anonymous) @ calendar_popover.js:180
Promise.then (async)
_renderEventPopover @ calendar_renderer.js:861
eventClick @ calendar_renderer.js:416
Calendar.publiclyTrigger @ main.js:6981
EventClicking._this.handleSegClick @ main.js:6462
realHandler @ main.js:385
```

It would happen because the domain of the partner_id is ["state", "not in", ['draft', 'sent']] but the state field is invisible="1" in the view.
state was absent during of the evalContext in the _evalModifiers function.

closes odoo/odoo#72617

Taskid: 2524993
X-original-commit: 0d636c0f8dbcfb4b7adda26c0edc02a12b0c7e44
Signed-off-by: Michaël Mattiello <mcm-odoo@users.noreply.github.com>
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-06-23 11:15:21 +00:00
Aaron Bohy e973e61c5f [FIX] web: click all as demo: load menus as demo user
Before this commit, the clickEverywhere test was run for the demo
user on all apps available for the admin. It thus crashed on the
apps that aren't available for the demo user.

closes odoo/odoo#72430

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-06-22 09:02:40 +00:00
Aaron Bohy 36370207b7 [FIX] web: clickbot: correctly select first level menus
Before this commit, when we wanted to select first level menus
inside an app (i.e. menus available in the navbar), we could by
mistake select sub-menus if the dropdown was opened (e.g. if it
was previously tested). For instance, it happened in the 'Apps'
app. It then led to wrong index computation, and a traceback. As
a consequence, the nightly build failed as the clickEverywhere test
didn't pass.
2021-06-22 09:02:40 +00:00
Aaron Bohy a52a25d4d9 [FIX] web: DebugManager: editView: correctly load view
Before this commit, the "Edit View" debug item only worked for
kanban, list and form views. For the other views, it opened a
blank form view. The reason is that for the other views, it didn't
correctly get the id of the view to edit.

Bug reported in the wowl-bugs pad

closes odoo/odoo#72523

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-06-23 09:44:10 +00:00
Mathieu Duckerts-AntoineandLucas Perais db2092d8d3 [REF] web,mail: action_service: doAction passes props to component
Before this commit the doAction method of the action_service did not support
to pass props directly to the Component. Only a few ad-hoc options were passed though.

After this commit, doAction can take a key "props" in options, that will be passed to the Component
(a View or a ClientAction)

the new API becomes
```ts

interface Options {
  props: { [key: string]: any };
  ...
}

doAction(action: ActionRequest, options: Options);

Note that some props (like withFilters) are set by the action service
and cannot be set via the key "props".

Alongside the change mentioned above, we take the opportunity to align the
terminology used in action service to the one used server side: we know use
the terms resModel, resId, and resIds instead of model, recordId, and recordIds.

```

closes odoo/odoo#72397

Related: odoo/enterprise#19127
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2021-06-21 13:21:53 +00:00
Michael Mattiello (mcm) 9ecadd06ac [IMP] web: add messageIsHtml option for rainbowman
Before this commit, rainbowman message was displayed using
`t-raw` in template.
Now, the message is escaped by default and needs to be marked as
HTML to be displayed as well.

closes odoo/odoo#72392

Task-id: 2575435
Related: odoo/enterprise#19121
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-06-22 08:06:07 +00:00
bbh-odooandxavierbol 842845bf46 [IMP] project,web: update the translation for some terms
It seems some terms are no translatable so purpose of the task is
to find those terms ans update to make them translatable.

So in this commit, translate the text attribute when the node is field
tag and this node contains widget='url' in its attributes. and
also make the project name as translatable.

closes odoo/odoo#71406

Taskid: 2487710
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: xavierbol <xbo@odoo.com>
2021-06-23 05:02:47 +00:00
Aaron Bohy e07bda1d4d [FIX] web: actions in target="new" should not update title
Before this commit, all actions, even those executed in target
"new" (i.e. in dialogs) updated the document's title. Actions in
dialog should not do that.

closes odoo/odoo#72526

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-06-22 11:37:52 +00:00