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.
closesodoo/odoo#83996
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
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
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] 468eb84fb4closesodoo/odoo#83805
Signed-off-by: Géry Debongnie <ged@odoo.com>
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
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.
closesodoo/odoo#83252
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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
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
closesodoo/odoo#83690
X-original-commit: 5ec64d15197e8d6cc7b115aeaca99aa49de0f151
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
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>
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
closesodoo/odoo#83529
X-original-commit: 88438fa9b363530aa4e5dec5599c1568fb7ccea0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
In the calendar UI, the avatars ratio has been edited differently with
the original
closesodoo/odoo#83494
X-original-commit: 81875cf0d0b2db5e2b2e0e70178d5ea04bdd509b
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
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.
closesodoo/odoo#81984
Related: odoo/enterprise#23464
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
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
Like in debug mode on optional field on tree view, show technical name on export view.
closesodoo/odoo#73898
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
closesodoo/odoo#83438
X-original-commit: e022c4bfafa77f1a3433c3b980631510af696ade
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
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.
closesodoo/odoo#83414
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
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
closesodoo/odoo#83374
X-original-commit: 184029e3e1e8907e25dd712dd87afd65885695bb
Related: odoo/enterprise#23744
Signed-off-by: Achraf <abz@odoo.com>
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.
closesodoo/odoo#83384
X-original-commit: 692fd6ecee602f7ceaae093b855aff65d50ca797
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Define "Bootstrap v5 ready" utility-classes to handle inline margins.
These classes definitions can be safely removed after migrating to v5.
task-2731819
closesodoo/odoo#83260
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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.
closesodoo/odoo#82874
Signed-off-by: Raphael Collet <rco@odoo.com>
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
closesodoo/odoo#82851
Related: odoo/enterprise#23537
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
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.
closesodoo/odoo#82407
Task-id: 2741837
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
closesodoo/odoo#83107
X-original-commit: 32e2d88ca0a864c91992b2c522ef21dbcb9787a5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
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.
closesodoo/odoo#82736
Related: odoo/enterprise#23609
Signed-off-by: Géry Debongnie <ged@odoo.com>
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
closesodoo/odoo#81184
Signed-off-by: Arnaud Joset <arj@odoo.com>
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.
closesodoo/odoo#82972
X-original-commit: ab8350b5432a6a6d671bcc76413815274f7daaca
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
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#82835closesodoo/odoo#82841
X-original-commit: 3014e922b48696fb9aba4b477ebe1878dd01bb69
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Olivier Dony <odo@odoo.com>
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.
closesodoo/odoo#82823
X-original-commit: 3c8409d946e549a3d3f104b9417257b5dc7cf0c8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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/9f048625e11dacda9fd49694e89ae65bc112374fclosesodoo/odoo#82777
X-original-commit: 95f280c4032a7358deeedae1cb6f63beab70387b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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.
closesodoo/odoo#82752
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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.
closesodoo/odoo#82193
Signed-off-by: Géry Debongnie <ged@odoo.com>
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.
closesodoo/odoo#82625
X-original-commit: 0e3663f28fd012d0fced14759f9f38592014c076
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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"),
});
```
closesodoo/odoo#82541
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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).
closesodoo/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>