Commit Graph
14874 Commits
Author SHA1 Message Date
Victor Feyens 64aceb8914 [IMP] web: add test to cover recent change in framework
See 79f7c233ec

closes odoo/odoo#84011

X-original-commit: c5d8bb8ba0870d2b6fb00c57846ab8da7092398a
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-02-07 10:07:53 +00:00
Nicolas (vin) c915373920 [FIX] web: BasicModel: contexts order
When combining the context for an RPC, the
additional context is being added before the raw
context.

Because of this, a use case such as:
   - A o2m field with a context {'field': 'a'}
     with a tree editable view below it
   - That view defines controls to create lines,
     which would change the context key 'field' to
     another value.
=> The field context key would take precedence on
the creates key, making it impossible to override
that key in specific circumstances.

closes odoo/odoo#83996

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-02-07 10:07:50 +00:00
Adrien Widart 30f4a40e20 [FIX] web: compute aggregate value with valid data
The footer of some lists may contain undesirable values (such as `NaN`)

To reproduce the issue:
1. Install mrp with demo data
2. In Settings, enable "Work Orders"
3. Open the list view of MOs
4. Group by product

Error: The total value for Expected Duration and Real Duration is
`NaN:NaN`

(The below explanation is about Expected Duration
(`production_duration_expected`). This is exactly the same behavior for
Real Duration)

As defined on the list view, if there are several rows on the list,
there must be a sum of all `production_duration_expected`:
https://github.com/odoo/odoo/blob/cddbb76e02c3848819ac1f06948b4e7ab8df4bdd/addons/mrp/views/mrp_production_views.xml#L35
This is correctly working when consulting a standard list of MOs (step
3). However, this is different when using the Group-By feature.

When rendering the list, at some point, `_computeColumnAggregates` is
called to compute the sum of all `production_duration_expected`:
https://github.com/odoo/odoo/blob/4e213f0b93f59cf377271b18eae9765ff9cfbe4f/addons/web/static/src/legacy/js/views/list/list_renderer.js#L178-L185
Here is the issue: the rows in the list `data` are not records (there
are results of `read_group`) and these rows don't have any aggregate
value for `production_duration_expected`, which means that
`d.aggregateValues[attrs.name]` returns `undefined`. As a result, when
performing the sum of `0` and `undefined`, it gives `NaN`.

Some detailed explanations:
`aggregateValues` is completed when processing the result of the
`read_group` RPC:
https://github.com/odoo/odoo/blob/bc79a329a1e1edf964f97886943c0688db2087fd/addons/web/static/src/legacy/js/views/basic/basic_model.js#L4697-L4703
However, on PY-side, `read_group` doesn't provide any value for
`production_duration_expected`. For a `read_group` to provide some
aggregate values, it needs the field to be stored and the
`group_operator` attribute to be defined on this field:
https://github.com/odoo/odoo/blob/5691b126f06c2b200ae507bd6edd8f8f7e68d5f5/odoo/models.py#L2521-L2528
Except that none of the conditions are met:
https://github.com/odoo/odoo/blob/d584ad282178deb40bb036c48f971617b0a41f88/addons/mrp/models/mrp_production.py#L147

OPW-2735181

closes odoo/odoo#84035

X-original-commit: 8bc1c582b626aedb680d59f858c92db9dfe4f357
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-02-07 09:07:00 +00:00
Paolo (pgi) ee324e8374 [FIX] web, l10n_ch: Error Correction Level QR Bill
l10n_ch QR bill report needs level 'M' (15% red.)
instead of default level 'L' (7% red.) as per:

https://en.wikipedia.org/wiki/QR_code#Error_correction

See specifications at:

https://www.paymentstandards.ch/dam/downloads/ig-qr-bill-en.pdf

The layout of higher level of Error Correction
are made of a thicker grid with more squares
(more information) at the cost of them being smaller
(a little harder to be read by the scanner).

opw-2584899

closes odoo/odoo#82932

X-original-commit: 0f374b61a6f3b25a1f986afe455c0e42797a5769
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2022-02-04 19:44:38 +00:00
std-odoo d44e591ca9 [IMP] web: use Yes/No instead of True/False in views when grouping
Purpose
=======
When we group the record based on a boolean fields, we want to show
"Yes/No" instead of "True/False".

This has been done for the list view, the pivot view and the kanban
view.

Task-2648390

Part-of: odoo/odoo#79911
2022-02-04 09:28:12 +00:00
std-odoo eddef06ad4 [IMP] web: use Yes/No instead of True/False for the custom filters
Purpose
=======
"True" and "False" are not very user-friendly, especially for
non-technical people. Instead, we want to have "Yes" or "No" for the
custom filters, when we search on a view, which have more sens for
non-technical people.

Task-2648390

Part-of: odoo/odoo#79911
2022-02-04 09:28:11 +00:00
stefanorigano (SRI) da5d9e745f [REF] mail: o_Activity, revamp scss
Review and simplify activities SCSS.
Part of the overall v16 SCSS optimization/restyle (task-2704984).

task-2731819

Part-of: odoo/odoo#82590
2022-02-03 17:07:59 +00:00
Gorash e830953570 [IMP] IrQweb: refactoring and add technical documentation
Major changes:
- Remove some of the recursively when compiling
- Compile attributes became a directive
- Compile options became a directive
- `t-field` compilation now uses the same logic as `t-out`
- Simplification of ``t-if`` directive compilation
- Improved handling of errors wrapped by QWebException
- Constants defined outside the class

    Odoo
     ┗━► _render (returns MarkupSafe)
        ┗━► _compile (returns function)                                        ◄━━━━━━━━━━┓
           ┗━► _compile_node (returns code string array)                       ◄━━━━━━━━┓ ┃
              ┃  (skip the current node if found t-qweb-skip)                           ┃ ┃
              ┃  (add technical directives: t-tag-open, t-tag-close, t-inner-content)   ┃ ┃
              ┃                                                                         ┃ ┃
              ┣━► _directives_eval_order (defined directive order)                      ┃ ┃
              ┣━► _compile_directives (loop)    Consume all remaining directives ◄━━━┓  ┃ ┃
              ┃  ┃                              (e.g.: to change the indentation)    ┃  ┃ ┃
              ┃  ┣━► _compile_directive                                              ┃  ┃ ┃
              ┃  ┃    ┗━► t-if            ━━► _compile_directive_if                 ━┫  ┃ ┃
              ┃  ┃    ┗━► t-foreach       ━━► _compile_directive_foreach            ━┛  ┃ ┃
              ┃  ┃    ┗━► t-inner-content ━━► _compile_directive_inner_content ◄━━━━━┓ ━┛ ┃
              ┃  ┃    ┗━► t-options       ━━► _compile_directive_options             ┃    ┃
              ┃  ┃    ┗━► t-call          ━━► _compile_directive_call               ━┫ ━━━┛
              ┃  ┃    ┗━► t-att           ━━► _compile_directive_att                 ┃
              ┃  ┃    ┗━► t-tag-open      ━━► _compile_directive_open          ◄━━┓  ┃
              ┃  ┃    ┗━► t-tag-close     ━━► _compile_directive_close         ◄━━┫  ┃
              ┃  ┃    ┗━► t-out           ━━► _compile_directive_out             ━┛ ━┫ ◄━━┓
              ┃  ┃    ┗━► t-field         ━━► _compile_directive_field               ┃   ━┫
              ┃  ┃    ┗━► t-esc           ━━► _compile_directive_esc                 ┃   ━┛
              ┃  ┃    ┗━► t-*             ━━► ...                                    ┃
              ┃  ┃                                                                   ┃
              ┗━━┻━► _compile_static_node                                           ━┛

closes odoo/odoo#81024

Related: odoo/enterprise#22942
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-02-03 08:09:31 +00:00
Aaron Bohy f16278cd29 [IMP] web: boot: do not wait 5s to log module info
Since [1], the test suite waits for 5s to start running. It's
really annoying when you run the suite in your browser, to debug
a single test or a sub suite. Waiting for 5s to determine whether
all modules can be loaded or not is not necessary anymore since
all assets coming from the same bundle are loaded in a single
file, even in debug=assets. This is true under the assumption that
there's no js module in assets_common requiring a module in another
assets bundle, which seems reasonnable.

[1] 468eb84fb4

closes odoo/odoo#83805

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-02-02 09:03:55 +00:00
Sébastien Geelen (sge) 26bbac2b61 [FIX] web_editor, project: better field html sizing
Allow wysiwyg field html to blend better in odoo view,
Remove the default resizer and make the field html's size
automatically fit its content

task-2637488

# Conflicts:
#	addons/project/static/src/js/project_form.js

Part-of: odoo/odoo#83792
2022-02-02 09:03:44 +00:00
Sébastien Geelen (sge) 14f4bd526a [FIX] web_editor: adjust codeview button placement
Move the codeview button to avoid conflict with the Translate button.

task-2637488

Part-of: odoo/odoo#83792
2022-02-02 09:03:43 +00:00
Victor Feyens 79f7c233ec [FIX] web: do not send unmodified data to the server on record save
Following recent conversion of onchanges to computes in the sale scope,
it was observed that updating one line triggered price recomputation in other
lines (which isn't expected).

After investigation, it seems that the `product_packaging_id` field is considered
modified and sent on SO save for all the lines, which triggers the `product_uom_qty`
record computation, then the whole price computation is triggered, since it depends
on that quantity field.

This commit aims to fix this case by only considering a m2o field as modified
if its value was effectively changed.

closes odoo/odoo#83252

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-02-01 18:06:54 +00:00
stefanorigano (SRI) 035df6293b [ADD] web: opacity utility classes
Add new utility classes to handle basic opacity behaviors.
Once migrate to BTS5 these classes should be generated using the
upcoming utility classes API.

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2731819

Part-of: odoo/odoo#83108
2022-02-01 12:45:05 +00:00
Samuel Degueldre ad171e10f0 [FIX] web, website_livechat: fix embedable chat on external websites
Recently, a lot of the network infrastructure code was rewritten. A lot
of this new code doesn't account for the possibility of being on an
external website, and so network requests made with relative URLs would
not make their request to the odoo server but to the server serving the
external page which would fail.

This commit fixes that by replacing the regular rpc service with one
that will add the correct prefix, as well as patching the
"browser.fetch" method to do the same. Additionally, the localization
service is now less fault-tolerant, and won't silently fall back to a
default configuration if it cannot get the translations from the server,
as such, the tranlsations route is made available cross-origin, which
has the added bonus of making translations available to the embeded
code.

opw-2677184

closes odoo/odoo#83690

X-original-commit: 5ec64d15197e8d6cc7b115aeaca99aa49de0f151
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-02-01 07:11:27 +00:00
Kartik Chavda a7fb497435 [IMP] web: add new option format_type for daterange widget
Purpose of this commit to add format_type option in daterange
widget.

So, In this add format_type option in nodeoption which convert
actual formatType to given format_type in option and add test
case for that feature.

task:2710539

Closes: #81630
Related: odoo/enterprise#22994
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-31 19:25:48 +00:00
Benoit Socias daf5963845 [FIX] web, website: rely on hotkey_service for hotkeys in website
Since [1] when web's owl services were made available to the frontend,
the navigation mixin does conflict with the hotkey service.
E.g.: navigation mixin consumes the 'alt' keyup event, which prevents
the hotkey service from cleaning up the hotkey overlay.

After this commit the old mixin is neutralized and hotkeys in website's
pseudo-backend layer are handled by the general hotkey service.
Also since [2] the menu items are inside `<div>` instead of `<li>`,
adapted the scss to take this into account.
Also added a CSS rule to neutralize the outline on website's menu
dropdowns which are `<a>` instead of the already handled `<button>` in
web.

[1]: https://github.com/odoo/odoo/commit/db7b485d984e50fae5a52308634166460e5fc908
[2]: https://github.com/odoo/odoo/commit/84715436d87bb05b421bc9ccaacda67d07571690

task-2738578

closes odoo/odoo#83529

X-original-commit: 88438fa9b363530aa4e5dec5599c1568fb7ccea0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-01-27 18:51:49 +00:00
tranngocson1996 42b0799ed3 [FIX] web: fix avatar ratio
In the calendar UI, the avatars ratio has been edited differently with
the original

closes odoo/odoo#83494

X-original-commit: 81875cf0d0b2db5e2b2e0e70178d5ea04bdd509b
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-01-27 16:17:24 +00:00
Mathieu Duckerts-Antoine 795ccdf923 [IMP] web: remove component ref
OWL-2 is in preparation and will be soon merged. One of the changes it
will bring is that it will be no longer possible to use the directive
t-ref on a tag component. Here we refactor the code in order to remove
two uses of such t-refs.

closes odoo/odoo#81984

Related: odoo/enterprise#23464
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-27 16:16:57 +00:00
Mathieu Duckerts-Antoine afb4959c3e [REF] web: action service: historyBack
OWL-2 is in preparation and will be soon merged. One of the changes it
will bring is that it will be no longer possible to use the directive
t-on on a tag component. Here we refactor the code in order to remove
one use of it in the action service.

Part-of: odoo/odoo#81984
2022-01-27 16:16:56 +00:00
baa 48749bfa0a [IMP] base: with arabic/english invoicing mandatory in UAE and KSA, a font that contains arabic characters is needed
closes odoo/odoo#79664

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-27 16:16:51 +00:00
stefanorigano (SRI) c1e5fd3acf [IMP] web: .badge, review design
This commit defines an arbitrary `min-width` aiming to achieve a
perfect(ish) circle when a badge contains only one character.
The badge extends as usual when more characters are rendered.

This commit addresses also an issue caused by margins defined globally,
while necessary to handle m2m field only.  

Part of the overall v16 SCSS optimization/restyle (task-2704984).

task-2731819

Part-of: odoo/odoo#83036
2022-01-27 11:07:21 +00:00
Florent de Labarre 1bfa35d831 [IMP] web: show technical name in export view
Like in debug mode on optional field on tree view, show technical name on export view.

closes odoo/odoo#73898

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-27 11:07:04 +00:00
Julien Mougenot 0dc347370f [FIX] web: Allow XML template attachments
Before this commit: static XML templates could only be defined on the
file system, and called by manifest assets or ir.asset records.
Attachments were not taken into account when evaluating static
templates.

Now, if a given path does not match a file on the system, an
additional check is run on ir.attachment records instead of failing
directly.

Task 2715333

closes odoo/odoo#83438

X-original-commit: e022c4bfafa77f1a3433c3b980631510af696ade
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-01-26 19:22:57 +00:00
Xavier-Do b1efacf417 [FIX] web: fix tests for runbot
On runbot database can be create concurently by other builds, meaning
that the teardown may fail randomly if a database is create between
setup and teardown. Filtering on the dbfilter in all case may miss some
errors but will be enough in this case.

closes odoo/odoo#83414

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-01-26 14:09:06 +00:00
Achraf (abz) 5cd61fc810 [FIX] web_studio: add background image in the cache hashes
When changing the background image with studio the image does not update.
It works in debug=assets mode.
This is due to the fact that the caching system is not aware of the presence of a possible background image

opw-2696786

closes odoo/odoo#83374

X-original-commit: 184029e3e1e8907e25dd712dd87afd65885695bb
Related: odoo/enterprise#23744
Signed-off-by: Achraf <abz@odoo.com>
2022-01-26 10:15:59 +00:00
Aaron Bohy ca28cff17d [FIX] web,mail: fix wrong assertions in tests
This is not a big deal, but by passing a widget instance or a DOM
node as message to a QUnit.assert function, QUnit keeps a reference
to that instance or DOM element, and it can never be garbage
collected (nor its bound handlers in the case of a DOM element).

For the mail case, this was a bit more critical as we didn't check
what the author of the test actually wanted to check.

closes odoo/odoo#83384

X-original-commit: 692fd6ecee602f7ceaae093b855aff65d50ca797
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-26 08:49:09 +00:00
stefanorigano (SRI) f389f59547 [ADD] web: inline-margin utility classes
Define "Bootstrap v5 ready" utility-classes to handle inline margins.
These classes definitions can be safely removed after migrating to v5.

task-2731819

closes odoo/odoo#83260

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-25 13:52:35 +00:00
Philippe Wauthy a49e569bef [FIX] web: remove search_default and group_by context keys when clicking on graph
closes odoo/odoo#80463

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-01-25 09:57:10 +00:00
Xavier-Do 3c58197d81 [IMP] web: add tests for database manager
Database manager may easily be broken since it wasn't tested and is a
special case (can be rendered without databases).  This commit adds a
basic test to check that the database manager is rendered as expected.

Testing database rendering is not enough, in some cases the database
operations may be broken.  Another test will be executed on runbot to
test basic create/duplicate/delete operations.  The test is tagged as
"-standard" since it can be a risk to execute such operation
automatically with other tests.

closes odoo/odoo#82874

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-01-24 11:09:56 +00:00
Fabien Pinckaers 6b87526048 [IMP] Speed Imp: remove unnecessary base64 encode & decode
Avoid to base64 encode, then decode to process assets and images for a ~25% speed improvement.
Change image processing tool to work on images, rather than base64 encoded strings.

Performance is ~25% faster on assets & images:

  /web/assets/...frontend.min.css:    13ms to 7ms,  base64 enc/dec: 2 -> 0
  /web/image/XML_ID:                  10ms to 8ms,  base64 enc/dec: 3 -> 0
  /web/image/res.users/2/avatar_128:  40ms to 20ms, base64 enc/dec: 6 -> 2

closes odoo/odoo#82851

Related: odoo/enterprise#23537
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-01-22 11:51:42 +00:00
FrancoisGe 6daa9188cb [IMP] web: highlight searchValue in CommandItem
With this commit, when you perform a search in the command palette,
the part of the commandItem's name that matches the searchValue will
be highlighted.

closes odoo/odoo#82407

Task-id: 2741837
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-21 09:40:50 +00:00
Achraf (abz) 7c362b0b14 [FIX] web: Infinite loop with datepicker input
Steps:
 - Go into a view and filter on date/datetime
 - Select between
 - change the input max date manually
 - click outside the calendar while remaining in the filter dropdown to "validate" the input
 - infinite loop/crash

Same problem/fix as https://github.com/odoo/odoo/pull/78394 in 14.0

opw-2722797

closes odoo/odoo#83107

X-original-commit: 32e2d88ca0a864c91992b2c522ef21dbcb9787a5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
2022-01-20 17:39:12 +00:00
Julien Mougenot db63ff2259 [REF] web: Owl imports adaptation
In the next version of Owl, all exported terms are directly available
from the top level `owl` object. This commit aims to adapt existing
imports to this new system. This is done by importing any Owl property
used in files at the top, right after the `import` or `require`
statements.

closes odoo/odoo#82736

Related: odoo/enterprise#23609
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-01-20 11:03:01 +00:00
Leonardo Pavan Rocha 022d34e1e5 [IMP] calendar: improves colors and design
In calendar events, the displayed colors are a bit dark and meeting
names in black don't have enough contrast. This commit fixes this
issue and improves general design of the calendar module.

task-2704288

closes odoo/odoo#81184

Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-01-20 08:21:50 +00:00
Leonardo Pavan Rocha 14b009c071 [REF] calendar: fix typo in o_event_highlight class
Fixes a typo in the calendar css class 'o_event_hightlight' to
'o_event_highlight'.

task-2704288

Part-of: odoo/odoo#81184
2022-01-20 08:21:50 +00:00
FrancoisGe 91394ed79d [FIX] web: Command Palette FooterComponent
This commit solves a naming error introduced by commit 1e1b45ea62, the name of a component always starts with a capital letter.

closes odoo/odoo#82629

Related: odoo/enterprise#23285
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-01-19 16:52:18 +00:00
Christophe Monniez 8b295ad968 [FIX] tests: bump allowed assets generation time
As this test is always red, notably because of the qunit asset bundle, the
threshold is raised for some bundles based on runbot builds
observations.

closes odoo/odoo#82972

X-original-commit: ab8350b5432a6a6d671bcc76413815274f7daaca
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-01-18 13:40:47 +00:00
Samuel Degueldre f108b21e6b [REF] web: stop using component ref in navbar
This is in preparation for owl2

closes odoo/odoo#82326

Related: odoo/enterprise#23289
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-01-18 13:40:30 +00:00
Samuel Degueldre 53b7d2a632 [REF] web: stop using component ref in dialog tests
This is in preparation for owl2

Part-of: odoo/odoo#82326
2022-01-18 13:40:30 +00:00
Samuel Degueldre 8b38281b84 [REF] web: stop using component ref in popover tests
This is in preparation for owl2

Part-of: odoo/odoo#82326
2022-01-18 13:40:29 +00:00
Samuel Degueldre b773f9e492 [REF] web: stop using component ref in createControlPanel
This is in preparation for owl2

Part-of: odoo/odoo#82326
2022-01-18 13:40:29 +00:00
Olivier Dony 1b8fa102e9 [FIX] base: render db manager w/ qweb and no db
Due to #82724 and 8ec7739dd72fa0976697f7738b225dbb9efa7c97,
the qweb renderer can't be used directly, however there is no way to use
the proper ir.qweb one without a database.

This is necessary for the /web/database/ routes (db manager) which work
without a database, and require qweb rendering since the abandon of
jinja rendering in v15.

This patch builds on the preparation work of the qweb/ir_qweb merge in #81024
which introduces a limited helper `render()` method in ir_qweb so that
it can be used statically without a database.

Fixes #82835

closes odoo/odoo#82841

X-original-commit: 3014e922b48696fb9aba4b477ebe1878dd01bb69
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Olivier Dony <odo@odoo.com>
2022-01-16 20:39:47 +00:00
David Monjoie 2a0298434f [REV] web: revert ensure scrollbar in mail designer
This reverts commit 247adbb3aa79223c18083caf31e6580905ce32e8 as it broke
the website design. We do not know yet what the reason is and we'll need
to investigate further. Probably a css specifity issue, but since this
is 15.0 stable, we chose to first revert the commit asap and re-do the
fix in another way later.

closes odoo/odoo#82823

X-original-commit: 3c8409d946e549a3d3f104b9417257b5dc7cf0c8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-14 19:15:20 +00:00
Antoine Guenet 449f8f3220 [FIX] web: ensure scrollbar in mail designer
Commit [1] moved the scrollbar from the document body to the top
element (#wrapwrap). This works for website builder but fails for
iframes which don't have that element. This is apparent in Marketing
Automation mail templates where it's become impossible to scroll down.
This fixes that issue by excluding iframes in that rule.

task-2734825

[1] https://github.com/odoo/odoo/commit/9f048625e11dacda9fd49694e89ae65bc112374f

closes odoo/odoo#82777

X-original-commit: 95f280c4032a7358deeedae1cb6f63beab70387b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-14 14:50:00 +00:00
Aaron Bohy 17b8539971 [IMP] web: replace unnecessary t-raw by t-esc
closes odoo/odoo#82755

Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-01-14 11:15:21 +00:00
luvi da8ff3d087 [IMP] web: t-ref instead of this.el in the CommandPalette
The commit adapts the CommandPalette to use a t-ref to a node
in the template instead of a this.el.querySelector("...") in
the component to query an element. This will improve the
compatibility with Owl 2.

closes odoo/odoo#82752

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-14 11:15:18 +00:00
luvi 741b79cfcc [IMP] web: trim keywords in the search bar
When the search field is used to query an element, the value is
trimmed to remove unnecessary spaces before and after the actual
keywords. This eliminates the annoyance of a search having no
result because of a space that was left (for example when copy-
pasting some text). A test has been added to check if a value
has been trimmed when the text input contains spaces.

closes odoo/odoo#82193

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-01-14 07:47:08 +00:00
Bruno Boi 5bfcf170e5 [FIX] web: clear unused option from hotkey service
When adding an hotkey callback through the service's API, the `activeElement` option had no effect at all and in fact was relics of the hotkey service's development process.

It has been removed as it was broken anyway and not tested.

closes odoo/odoo#82625

X-original-commit: 0e3663f28fd012d0fced14759f9f38592014c076
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-12 14:03:37 +00:00
FrancoisGe 1e1b45ea62 [IMP] web: Command Palette footer
This commit will change the setting of the emptyMessage and the
footer of the main command palette.
In order to make the command palette footer more customizable, we will
replace it with a Component. For example, using a footerComponent in the
main command palette allows us to adapt its text based on the namespaces
used.

Setting up an empty message:
Before:
```
registry.category("command_empty_list")
        .add("@", _lt("No user found"));
```
After:
```
registry.category("command_setup")
        .add("@", {
            emptyMessage: _lt("No user found"),
            });
```

With this commit, it is possible to add a namespace to the footer tips:
```
registry.category("command_setup")
        .add("@", {
                name: _lt("channels"),
            });
```

closes odoo/odoo#82541

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-12 11:19:00 +00:00
Mathieu Duckerts-Antoine 1f85f7403d [FIX] web: graph: line chart color
Before this commit, in a line chart in comparison mode with one groupby,
if only data comming from the comparison period were displayed, the line
(with red border) would be filled incorrectly with a blue color while it
was not supposed to be filled at all (the blue filling is supposed to be
reserved to data comming from the reference period).

closes odoo/odoo#82577

Forward-port-of: https://github.com/odoo/odoo/commit/6747d982a56af0525cf52732c43351081831d32f
X-original-commit: 519e205a4b34fdecfe6b938ff4a6e93a02c2bda2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-11 16:19:00 +00:00