Define "Bootstrap v5 ready" utility-class to handle font-style.
This class definition can be safely removed after migrating to v5.
This class is needed for https://github.com/odoo/odoo/pull/87639
task-2811202
closesodoo/odoo#87637
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
The target "main" feature has been lost during the conversion of
the ActionManager into the action service. An action with target
"main" should always clear the breadcrumbs. This commit
re-introduces the feature.
Fixes#83865closesodoo/odoo#87610
X-original-commit: 78ec7281ed550eb24629c1b81445b753314d292f
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Aaron Bohy <aab@odoo.com>"
The odoo.addons.web.controllers.main python module have been splitted
over multiple files on the basis 1 controller = 1 file. In this work we
adapt all modules to use the new imports.
A non-exhaustive list of where stuff have been moved:
* main.Home --> home.Home
* main.Session --> session.Session
* main.WebClient --> webclient.WebClient
* main.clean_action --> action.clean_action
* main.ensure_db --> home.ensure_db
The complete list is accessible in odoo.addons.web.controllers.main.
closesodoo/odoo#87571
Related: odoo/enterprise#25746
Signed-off-by: Raphael Collet <rco@odoo.com>
The odoo.addons.web.controllers.main module was a very long bloated file
where many different controllers were concatened. It proved difficult to
work on that file on a regular basis,mainly because ctrl-p "web main.py"
was not pointing the right file.
In this work the file has been split on the basic 1 controller = 1 file.
The original way of importing stuff (through main.py) is still possible
thanks to deprecated aliases.
Part-of: odoo/odoo#87571
Install auth_signup, go to /web/login, 500 Internal Server Error.
auth_signup extends the /web/login template and in this extension calls
`keep_query()` which has been wrongly moved from base to http_routing in
commit 880954ebfc. Here, we restored `keep_query()` in the base module
but moved in ir_qweb.
closesodoo/odoo#87491
Related: odoo/enterprise#25754
Signed-off-by: Julien Castiaux <juc@odoo.com>
This commit renames the `Commands` object exported by the orm
service into `x2manyCommands`, and adds the magic numbers in that
object.
closesodoo/odoo#87582
Related: odoo/enterprise#25750
Signed-off-by: Géry Debongnie <ged@odoo.com>
Before this commit, the href attribute of menu elements didn't
contain the "action=xx" part but only the id of the menu.
closesodoo/odoo#87570
X-original-commit: 6b8242ee1918b784dfdb2160cca6df1c165a824b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to follow
- Go to the Sales app
- Search for a entry with a space at the end
-> No results are returned
The search input should be trimmed, it was in 13.0
opw-2803156
closesodoo/odoo#87529
X-original-commit: 06817417e190d64ab6b0fc6151e02b6090b1fd39
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Prior this commit the spinner was an image.
After this commit the spinner is an animated SVG. It also improves the
layout of the block_ui component.
task-2750837
closesodoo/odoo#83811
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit simplifies the SCSS of the command palette component.
task-2748052
closesodoo/odoo#83938
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
In #86163 we added a check on the branch name to avoid running the
tooling on stable branches, however this check used bash-specific
syntax. While the hashbang in the pre-commit hook specifies that the
hook should be run using bash, we were using the npm module "husky" to
manage git hooks, which would ignore this hashbang and always run the
hook using sh, causing the hook to fail in all cases.
After some consideration, we have decided to stop using husky, as its
main purpose is to make hook management easier in npm-based projects.
Since we already need a script to enable the tooling, we can do
essentially the same thing that husky is doing but with more control
over the process with no drawbacks.
closesodoo/odoo#87436
X-original-commit: 3104ab16ecf88d4f7b1618db4d62e7f57df34e6c
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
There were inconsistencies in the calls to `_render`.
* the view context could contain information that misled developers.
Indeed, the context and value of the view are not supposed to be found
in the rendering. Thus by calling `ir.qweb` with the name of the
template, we ensure that there is no unwanted information and in
addition the cache key is that of the name of the template which saves
a query.
* the context used for rendering was modified by a method on
`ir.ui.view`, except this is not information used by this model. There
is now a `_prepare_environment` method residing on `ir.qweb`. This
method allows to modify the value dictionary as well as the context in
which the rendering will be done. This preparation of the data as well
as my security check is done only once per rendering. This also saves
some queries
* Freeze options for rendering were inconsistent. It could be that
options on which rendering depends were not part of the cache key. Thus,
depending on the user who generated the generation of the rendering
function, there was or was not information in the template. For example
for automatic branding. This is no longer possible, because it is the
context that is used. The options serving as a cache key are only
recorded for information (for the profiling system for example). A
simplification of the `ir.qweb.field` models could be made.
The report rendering and call `ir.qweb` instead of `ir.ui.view`.
Part-of: odoo/odoo#85110
This commit fixes a bug present in FieldEmail and
FieldPhone where the handler on the click event was
triggered twice and was not preventing the field to
turn into quick edit mode appropriately.
A test has been added for EmailField to ensure the
correct behavior
PR enterprise: odoo/enterprise#25506closesodoo/odoo#87196
X-original-commit: 852e084c355e9be77c693b32bf1119570e4d49d0
Related: odoo/enterprise#25558
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- Install accounting
- Create more than 6 analytical tags
- Create an invoice
- Create a payment
- Go in Accounting>Actions>Reconciliation, tab Manal Operations
- In the field Analytical Tag, click on 'Search More' and selected 1 or multiple tags
Issue:
Void tags are displayed
Solution:
Fetch the field `display_name`
ref commit: 84f0644802865c6454014059842eb6a9d4fd40e4
opw-2734029
closesodoo/odoo#87311
X-original-commit: 936bad32cf1024570da4880ccc5375b02b30c1c2
Related: odoo/enterprise#25631
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Current behavior:
If you activate the packaging options of the inventory
tab. The external link of the packaging type in the inventory tab of a
product is invisible.
Steps to reproduce:
- Have inventory module installed
- Activate the packages & product's packaging options
- Go on a product page and then go in the inventory tab
- Add a line in the packaging tree view
- There should be an exteral link next to the packaging type after you
selected one
- The external link is invisible
Note: similar issue was also present in the Document's workflow rules.
opw-2749832
closesodoo/odoo#87305
X-original-commit: 57a92e6a1178e3bd9d9f8995388cdc67a354c585
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
*: web, website_slides.
Specifying both side of a relation when seeding test data is cumbersome.
Let startServer method handle it.
task-2792108
closesodoo/odoo#86939
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Steps to follow
- Go to the product page
- Open studio
- Click on the picture and set the size to large
- Save and quit studio
-> The size doesn't change
Cause of the issue
Studio sets the size attribute on the field as `[0, 270]`
This means the picture should have a height of 270px and an unspecified width.
But for that to work, we need to handle the case were only one
dimension is set.
opw-2745625
closesodoo/odoo#87226
X-original-commit: 50368a9db8ac67986cf64ff84ee625cbf7a90a1f
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
There is a concurrency issue in the action service:
1) be in an action with several views
2) execute another action (e.g. by clicking on a menu)
-> [calls the route "/web/action/load", and it takes a while]
3) meanwhile, click on another view in the view switcher
If the call to "/web/action/load" is long enough, it may happen
that the view requested in step 3 is briefly shown before the
action associated with the menu clicked in step 2.
In this scenario, the action of step 2 should never be displayed,
because the user requested something else afterwards (in this
case a switch view).
One can produce a similar issue when restoring a previous action
of the breadcrumbs instead of switching view.
This commit fixes those two issues by registering a resolved
promise in the keepLast (concurrency utils), s.t. it "cancels"
the potential current operation (in this case, the call to
"/web/load/action").
closesodoo/odoo#87204
X-original-commit: fb9c8cd6fee476d2506b8c1338bf88c4520ea7b6
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the view service kept the same cache information
even thought favorite filters would be created or deleted. This caused
inconsistencies when the interface tried to reload views that would
access the cache and display outdated information.
Now the related views cache keys are invalidated when favorite filters
are created or deleted.
closesodoo/odoo#76507closesodoo/odoo#87031
X-original-commit: 84e260e4ecad5116def4d9dcdd0b35d7e87fa45d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The purpose of this commit is to allow the removal of the search value
without removing the namespace.
Use case before this commit:
1. I perform a search in the homeMenu;
2. The command palette opens with "/" + my search;
3. I realise that my search is wrong and I would like to delete its
contents;
4. I press control+a to select the content of my search;
5. I press the backspace key;
6. The "/" and my search is deleted;
7. I perform a new search;
8. I realize that I forgot to add "/" at the beginning.
This commit will remove the namespace from the input which will allow
the user to delete the search without adding the namespace.
If the user wants to remove the namespace, they will have to press the
backspace key with an empty input.
If the user wishes to change the namespace, they will have to start
their search with that namespace. This will be removed from the input
and replace the old namespace.
closesodoo/odoo#86926
Task-id: 2768527
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
To reproduce the issue:
(Need a Windows machine)
1. Install Stock
2. Inventory > Products > Products
3. Try to write the diameter symbol (ALT + 155) in the search bar
Error: When pressing the key '1' on the keyboard, the page is redirected
to the Inventory Overview page
Because of hotkeys, it is not possible to use the Windows feature that
allows users to write ASCII characters with ALT+[numerical code from
keypad].
OPW-2731632
closesodoo/odoo#86981
X-original-commit: a0f419c40a8089571839c2f5a6c50d506faf9a0b
Signed-off-by: Bruno Boi <boi@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Steps to reproduce:
- create a contact with a very long name
- create a quotation
- in customer, type the first letter of the very long customer's name
- try to use the horizontal scroll bar
Issue:
close window on horizontal scroll
Solution:
Discriminate an horizontal scroll from a vertical scroll
A test has been added as well as the triggerScroll utility function
to allow proper tests when scrolling on elements
opw-2777443
closesodoo/odoo#86744
X-original-commit: e0b26496196bd4ee39fa06e1a3274982d2c7fb12
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Iucapad <luvi@odoo.com>
On 19e775b3cc we added the same rules that
exists in test_lint on the tooling, but we didn't add the globals.
closesodoo/odoo#86649
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Prior this commit, the dark color was the same as the Bootstrap color.
It wasn't contrasted enough and was therefore replaced by raw css in
some situations.
To keep consistency with the overall layout, this commit applies the
darkest gray as the $dark variable to improve the value and now
encourages the use of utility classes instead of raw values.
task-2788931
closesodoo/odoo#86046
Related: odoo/enterprise#25100
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
In a recent fix, the default values generated for datetime fields in
custom filter was incorrectly set, as the returned date objects were
lost instead of being assigned.
This commit restores the intended behavior.
closesodoo/odoo#86538
X-original-commit: 2720c5be24a1324c058eaaa0a6a7c627f92e856c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Prior this commit, the popover arrow was in raw SCSS and used only
the four basic directions (top, right, bottom, left).
After this commit, the popover uses the Bootstrap arrow and this
arrow can also use the additional directions defined in
`position_hooks.js`.
It also revamp the SCSS of the component.
task-2748120
closesodoo/odoo#83646
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Prior to this commit an 'oi-fw' icon width was assigned directly to its
:pseudoelement and eventually refined according to sizes classes.
Despite being useful in some circumstances, this behavior was causing
inconsistencies when 'oi-fw' icons were rendered beside 'fa-fw' ones.
This commit reviews how fixed-width icons are achieved, providing a more
consistent visual result between '.fa' and '.oi' classes.
task-2795108
closesodoo/odoo#86508
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit makes it simpler to override the action executed when
clicking on pivot cells or graph bars.
This is a nice to have for reports where we don't want to open the
report model but the model the report is based on.
TaskId-2764844
Part-of: odoo/odoo#85404
Currently when we click on external links from a PDF opened in our
PDF viewer, you are redirected to the link, means you are leaving
the record which is not ideal.
With this commit, external links in PDF document will be opened in
new tab so that the opened record is not lost. For that we need to
change the default option of the pdfjs lib, because we cannot pass
this parameter in iframe (link of the documentation is available in
task pad). For that, we changed the value of 'externalLinkTarget'
from 0 (which sets target to NONE) to 2 (which sets target to BLANK)
in 'getDefaultPreferences' function.
taskID-2752002
closesodoo/odoo#84594
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Prior this commit the rainbow man was built with many separate SVGs and
a lot of raw SCSS.
This commit refactors the rainbow man in order to use less raw SCSS and
more SVG attributes instead.
It also improves the overall animation with a little rotation of the
rainbow man's head during the fade in animation.
task-2742831
closesodoo/odoo#83403
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Define "Bootstrap v5 ready" utility-class to handle the property
overflow: visible.
This class definition can be safely removed after migrating to v5.
task-2742831
Part-of: odoo/odoo#83403
Before this commit, the animation of the rainbow, in the rainbow man
component, didn't work well in Firefox and Safari.
After this commit, this animation works well in every modern browsers.
task-2742831
Part-of: odoo/odoo#83403
Previously, the tooling for web ran on all branches, this can cause
problems because it will automatically lint all files that have been
changed on commit, which can cause a lot of noise in the diff which is
undesirable in stable branches, as it makes forward ports more
difficult, among other things.
This commit adds a condition in the tooling so that it only runs on
branches whose name starts with master to fix this issue.
closesodoo/odoo#86200
X-original-commit: 5962b63f4ad1cfeccc0a80de2307300b50492668
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
A server action sometimes returns an action with a help key.
That help was not marked up, leading to an incorrect display of that help.
closesodoo/odoo#86170
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Issue introduced with 030b1ba
Before this commit:
The hotkey overlays were not toggleable more than once in a row.
After this commit:
They can be.
closesodoo/odoo#86089
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In sign many NameAndSignature widgets are opened and closed since it is
expected that documents have multiple initial/signature fields. Everytime
the widget is opened, an rpc call to get_fonts is done, even if the request
has already been done before. This commit prevents this rpc call if the fonts
are already loaded.
task-2735814
closesodoo/odoo#83208
Related: odoo/enterprise#23653
Signed-off-by: Arnaud Joset <arj@odoo.com>
This will be useful to allow concrete views to attach event listeners to
their root element among other things.
closesodoo/odoo#85891
Related: odoo/enterprise#25030
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>