This commit intends to fix two strange bugs encountered while trying to
push a new component into the systray menu:
- MessagingMenuWidget and RtcActivityNoticeWidget were removing their
parent node via DOM manipulations when attached in the DOM. This caused
a crash when adding other items to the systray menu since the deleted
nodes were actually managed by OWL.
- The t-foreach directive in the navbar used indexes as the t-key, which
led mapping items subsequently added to wrong templates.
closesodoo/odoo#78784
X-original-commit: 5f0f80da4fc951954d253c9e45defd591605f556
Related: odoo/enterprise#21829
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Ooming <oomsveta@users.noreply.github.com>
Currently, projects that are 'on hold' stage are represented in grey in
the kanban progress bar while the colored dot on their card is in blue.
In this commit, we change the color of the 'on hold' stage into 'info'
instead of 'muted'. After this projects that are 'on hold' are display
blue in the kanban progress bar as well.
Task-Id:2633273
closesodoo/odoo#78761
X-original-commit: 0886c10d5f276aca2539060ffaa047780a408354
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
In task-2355704 changes were made to the pdf layout designer to allow more
flexibility when setting company data. However, for the default values of both
company_details and report_footer, the data wasn't being escaped, therefore
offering security risks. Also, they didn't take into account the address_format
when computing the default value. This PR implements Markup usage in the html
fields and fixes _default_company_details to use the set address_format.
closesodoo/odoo#78725
X-original-commit: 83aeb8fbc3b2a4b39123f756232e34c1ce603299
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
This isn't a problem in production, because the ActionContainer is
never destroyed, but it caused a small memory leak in the test
environment.
closesodoo/odoo#78698
X-original-commit: d01c89d80d58763e45309dbcfbf83f852866982e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the ui service listened to the "change" event
on several MediaQueryList corresponding to specific window sizes.
However, those event handlers were never removed. Whereas this
isn't an issue in production (services are started once and live
forever), this caused a memory leak in tests, where services are
deployed on demand, test by test.
There is no cleanup function for services (since they live forever
by nature). In the test environment, we have a solution for handlers
bound on window (i.e. window.addEventListener), by monkey patching
the function (thanks to the browser object), and automatically
removing all handlers bound during a test, at the end of that test.
This commit fixes the memory leak by no longer using addEventListener
on MediaQueryList (as this is a deprecated feature anyway [1]), and
simply using window (or browser)'s addEventListener instead. This
leak sometimes produced a timeout in the QUnit test suite [2].
[1] https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener
[2] https://runbot.odoo.com/web#id=2374&action=573&model=runbot.build.error&view_type=form&cids=1&menu_id=405
X-original-commit: d86cc5c016cf4eff9a7e4f8b35a9ed38ddc24636
Part-of: odoo/odoo#78698
This commit *could* prevent a test from failing randomly. The
important part in the diff is the switch from $.Deferred to native
Promise. JQuery Deferred behave differently upon resolution (it is
sync if the deferred is resolved directly, whereas it is not the
case for native Promise). I couldn't find any other reason to
explain why the test was sometimes failing. There is no reason to
use Deferred anyway.
The issue didn't occur after this commit in more than 600 builds.
[1] https://runbot.odoo.com/web#id=2297&action=573&model=runbot.build.error&view_type=form&cids=1&menu_id=405
X-original-commit: ed0761dce44bd37cdd9d40ddd6e021517f466f97
Part-of: odoo/odoo#78698
Before this commit, the changed test sometimes failed on runbot
(rarely though), because it might happen that the debounce released
before the promise returned by the click helper resolved (e.g. if
the server was overloaded, or was garbage collecting...). That
promise waited for a setTimeout, and then for a nextAnimationFrame.
In this scenario, there's no need to wait so long, as there is no
rendering to wait for.
Example of failing build: https://runbot.odoo.com/runbot/build/10360554
X-original-commit: 880c4683698c987f212e4a113b374230566001f1
Part-of: odoo/odoo#78698
Before this commit, it wasn't possible to patch some functions
(e.g. setTimeout) on window, because of the way we call them.
Indeed, we typically do `setTimeout(...)`, because this function
doesn't need to be bound to the window object.
X-original-commit: 476dbf75bb88dc2ddfdd47c1f229ce53cf7fadb7
Part-of: odoo/odoo#78698
In the new web client architecture, the user context is added to server
requests through the ORM service and is therefore not needed in the
action context. Thus the commit 7354d16 has removed it from the action.
Before the new webclient architecture, the user context was always
prepended to the action context. So this commit reintroduces it for
the legacy views and client actions through their proper adapters.
closesodoo/odoo#78685
X-original-commit: 7975674166a3d8fa9cd8714adab769a7fd681368
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Bruno Boi <brboi@users.noreply.github.com>
Before this commit
The current action is stored in the session storage with its evaluated
context. This design is wrong because a context is by definition
contextual which means it has to be evaluated at the last possible
moment to ensure it reflects the most recent context.
After this commit
The current action is now stored in the session storage it its most
original state. This is sufficient as in any case actions go through
the doAction method which evaluates the context right before applying
the action logic.
X-original-commit: 2533d47a1d312907389fb85af83f8812c402a609
Part-of: odoo/odoo#78685
Bug
===
If we open a view in readonly mode, click on a radio widget and if a
constraint exists on this field, an error message is raised.
(e.g. the enroll field in "website_slides_sale").
Technical
=========
This is because in the "Basic controller", in the "_onFieldChanged",
we force "force_save" if the view is in readonly mode. This is wanted
for widgets that can change the value even in readonly mode
(e.g. Priority), but clicking on a Radio widget switch the mode to edit,
so this is not needed.
To fix that, we call `setValue` after switching to the edit mode. So
the `setValue` is skipped in `_onInputClick` if we are in readonly mode,
and the `setValue` is done in `_quickEdit` instead.
Task-2668763
closesodoo/odoo#78684
X-original-commit: ff1329ca86691dd5f042158de6913c4aa2c69b6c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit
Each click event triggered inside a DropdownItem is default prevented
After this commit
Those click events will be default prevented only when the DropdownItem receives a props.href, which will turn it into an <a href/> element.
This corresponds to the initial intention: prevent the default click behavior of an <a href/> element and only keep the DropdownItem click behavior.
opw-2665795
closesodoo/odoo#78628
X-original-commit: 11760db91fc56fb8b998d77661f8d4d7842f3eb8
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
Currently markup-ification of the legacy notifications system
display the html content in notification layout for some of the
notification of document and planning from commit: https://github.com/odoo/enterprise/commit/ba44461fea337ed2e5adbdfa1e8eede00b036def
So here in this commit, we make the method `makeLegacyNotificationService`
always `_.escape(message)` and pass `messageIsHtml: true` to the owl
notifications system so notification with html content will be displayed
properly.
Task-2657391
closesodoo/odoo#78627
X-original-commit: 7ce6d8d70be79c9c626865598b898dce9a18b045
Related: odoo/enterprise#21782
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
There was a missing translation for apply/cancel button in
daterangepicker widget. With this change, we provide the odoo
translation to the library when initializing the picker.
opw-2628117
closesodoo/odoo#78588
X-original-commit: 40f128baba53ce29c2d03b7370e54b5010edb9ef
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
With this commit, we add percentage information in pie chart tooltip,
A pie chart is meant to illustrate numerical proportions.
In Odoo, when hovering a piece of a pie chart, the tooltip is currently not
displayed the proportion/percentage of the piece in the pie. The purpose of
this commit is to provide the user with the percentages of data distribution by
adding them in the tooltip.
In the tooltip displayed when hovering a piece of the pie chart, add the
percentage between brackets.
task-2608695
closesodoo/odoo#78343
X-original-commit: f73bd6dad71045d9f0a012259f148f0c768b964b
Signed-off-by: FrancoisGe <fge@odoo.com>
Currently, if there is unavailabilities day then white background and
border appear in calendar month mode. It does not show the same background.
Now the same background(grey) will appear.
closesodoo/odoo#78240
task-2648148
closesodoo/odoo#78444
X-original-commit: 64f2acc79d39331f79f3ac68d451f638cbd93393
Related: odoo/enterprise#21720
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Before this commit
An action retrieved from the session storage may not take into account
changes in the user context because the user context is duplicated in
the action context. When the user context changes i.e. through the
switch company menu (allowed_company_ids) and the browser reloads,
the action service will make the action context concatening the new user
context with the context of the action stored in the session storage,
which has still values from the previous user context.
After this commit
The makeContext function can now take an initial evaluation context.
This is then used in the action service in order to make use of the user
context when the action context is generated but without appending
it into the action one.
closesodoo/odoo#78415
X-original-commit: 7354d1686915ec21437fc677f15a6c5409106492
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
before this commit: when m2o has can_create=false and user try to search
something that doesn't exist then it should show 'No results to show' in m2o
autocomplete, because of commit: https://github.com/odoo/odoo/commit/4f116a0f9be26b91d95e019cda1aa620faf6d620
this has been broken.
after this commit: if user can not create m2o record and if user searches that
doesn't exist in m2o model then it will display 'No results to show'
task-2376435
closesodoo/odoo#78329
X-original-commit: a9e14acc3785c972bd037a8d4ca303c10dad265a
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Before this commit, the list of categories on the left, in the
ir.module.module kanban view, was untranslated
X-original-commit: d5feb987c523a3e188e87c181fe5aed7d03fabe3
Part-of: odoo/odoo#78259
On mobile, since the commit [1], the BlockUI is not aligned with the
viewport due to its absolute position.
This commit restores the previous value ("fixed").
Steps to reproduce:
* Open Odoo
* Go to Apps
* Scroll a bit the page
* Install one App => BUG
Ref:
[1] odoo/odoo@0573acae23closesodoo/odoo#78344
X-original-commit: 04db62a45f42aba72da7d36b94b3c5d03db37e20
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
The commit a27bbda37f1ad4 did not add a unit test.
Here it is.
closesodoo/odoo#78297
X-original-commit: e3a32191b6b9411abaf4c15550e537c666d615bd
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Headers of columns and rows are not properly aligned on RTL direction.
After this commit, they will be.
closesodoo/odoo#78261
X-original-commit: 2fb992d3ced438fd012d7702bdfbe23cce6000a6
Related: odoo/enterprise#21645
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Previously, when quickly mounting then unmounting a dropdown, a
traceback was shown. This is because the usePosition hook registered
listeners that were throttled/debounced, which would be called after the
component was already unmounted, causing the crash.
This commit fixes that by making cancelable the debounce timing util
and by introducing a new cancelable timing util: throttleForAnimation.
`debounce` and `throttleForAnimation` could be canceled i.e. when
a component is unmounted.
`throttleForAnimation` is used to replace throttle to avoid the popper's
scroll position not staying perfectly in sync with the page but instead
being slightly jittery, it effectively throttles a given function to the
display's refresh rate.
Also, the `throttle` util is kept unmodified but marked as deprecated.
Its implementation does not properly match its name, and we chose
to leave it as is because some code might already use it.
X-original-commit: a27bbda37f1ad444023cb1aae56675ac6c263cb2
Part-of: odoo/odoo#78261
Co-authored-by: Sam Degueldre <sad@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Before this commit:
Dropdowns menus were overriding the positioning hook direction flip
order in order to always stay in the same axis.
But a dropdown menu has as its maximum height 70% of the viewport.
These two "rules" aren't enough to ensure the whole spectrum of
possibilities will always make the menus entirely visible on screen.
We could have chose a correctier formula (50vh - toggler height), but
this would have led to sadly short dropdown menus in many cases,
so we chose the following alternative...
After this commit:
Dropdown components are no longer overriding the positioning hook
direction flipping order option.
That way, the flipping axis is no longer enforced and therefore the
menus will have a greater spectrum of possibilities to reposition.
This has shown us that it fixes the visibility issue of the menus.
E.g. when the menu flips to a right-middle position it could take up to
100vh and still get displayed entirely.
The position hook directionFlipOrder option has also been made
unavailable as there is no use case anymore.
X-original-commit: b768d771018843d7bfa8aab2e1b2e624d088e3f6
Part-of: odoo/odoo#78261
Revert "[FIX] web: dropdown: avoid positioning in mobile"
This reverts commit 1271ef80fafa4438271af0919dcca229aa20bf81.
Revert Reason:
A better alternative fix to the original
issue has been found. See preceding commit.
X-original-commit: 384169fb1b5874fd670f07fb2a6b1aca449f56c9
Part-of: odoo/odoo#78261
To compute a positioning, the usePosition hook uses as the default container
the <html/> element... but in the positioning computations it is assumed
that the container is scrollable which is not the case for small screens
when web_enterprise module is installed, as its webclient_layout.scss
applies rules to make sure only the main content is scrollable.
When the <html/> element is not scrollable, it can be scrolled out of the
viewport, which is problematic as the positioning computations are based
on a fixed positionment strategy.
The way we chose to fix this is to account the scrollTop position of the
container only if the container is the <html/> node.
If so, further computations will now take into account the amount of
scrolling the <html/> node has, and thus will be correct.
See https://developer.mozilla.org/docs/Web/API/Element/scrollTop fur
further understanding.
X-original-commit: a050094cdaa5dd6b76c3f10fb49d3a9c0813425a
Part-of: odoo/odoo#78261
The row groupby menus are always aligned on the left, but when a
multiple levels of groupby has been selected, it feels weird and
counterintuitive to see them aligned on the left whereas the row
labels are right aligned.
This commit makes sure that the alignment is coherent between the menu
and the row labels.
X-original-commit: b11b760365c45409b8ea10dee2a58c2e677e9d61
Part-of: odoo/odoo#78261
The owl OnboardingBanner component should be full width.
closesodoo/odoo#78228
X-original-commit: 3a0552a3a4e42bed8580715f097fad15f3e1e59f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
before this commit: custom filter on selection field shows database value while
it should display user freidnly value.
after this commit: custom filter on selection field will display UI value of
selection attribute instead of database value.
task-2363112
closesodoo/odoo#78181
X-original-commit: 0f268ba36b302df9f247c746db64987a966c1dec
Signed-off-by: FrancoisGe <fge@odoo.com>
This commit adds a command to activate the debug mode with assets from
another debug mode.
closesodoo/odoo#78159
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
In commit b4b5e8da3ee361cbdac6d5ebad29e67e24da8e81, we forgot to add
the moved files to the manifest.
We fix that in this commit.
closesodoo/odoo#78066
X-original-commit: 91e0f4a109dfdf6554c1cd2bb5c9d40b3a7fcbbc
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Before this commit, when the view switcher contained too many elements
(e.g.: CRM), in desktop mode but with a relatively small screen size
(i.e.: width ~< 1300px), the buttons of the view switcher went outside of the screen.
After this commit, the whole view switcher block is rejected on a new line.
closesodoo/odoo#78135
X-original-commit: dabc7b903340922557645c69df5858ca3360cc59
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
With this commit we display list selection box after all list header buttons,
previously buttons were displayed before header buttons.
task-2628038
closesodoo/odoo#78057
X-original-commit: 09c5e178c61feb69d6fd27e4bb9df979fa480f41
Signed-off-by: FrancoisGe <fge@odoo.com>
Since wowl framework is merged pager hitbox area is reduced and harder
to hit, with this commit we increase pager hitbox area.
task-2610578
closesodoo/odoo#78006
X-original-commit: ff788c20e9582adfb387d7111218a26b29519a70
Signed-off-by: FrancoisGe <fge@odoo.com>
Before this commit: In res.config.settings form view when user change something
in form and click on button in form then it will display to save the unsaved
changes, when we click 'Save' button from dialog still dialog remain there
it is not closed(while record is saved in background, just dialog is not closed)
This is because we called 'clearUncommittedChanges' method before executing
client action, 'Save' button on dialog returns client action for reload page
but as we calling 'clearUncommittedChanges' so it will call 'canBeDiscarded'
method of 'BaseSettingController' which again show dialog for unsaved changes.
After this commit: unsaved changes dialog is closed on clicking 'Save' button
from dialog, we called 'clearUncommittedChanges' method only if clientAction is
instance of Component, i.e. if client action is type of function which is our
case, reload is client action which type of function so in that case we do not
need to call 'clearUncommittedChanges'.
task-2662302
closesodoo/odoo#78035
X-original-commit: 5d8376a8f9a8957112afb35854bdb8b050bd6903
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before: the company menu would disapear when the screen was smaller than
some threshold. It is expected in enterprise, but not in community as
it doesn't have the burger menu.
After: The menu is set to always be displayed. To remove it becomes
an enterprise reponsability.
closesodoo/odoo#78034
X-original-commit: 039e24eabf258da6bfad45a839c51116f6d86e0c
Related: odoo/enterprise#21535
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Before: the user menu would disapear when the screen was smaller than
some threshold. It is expected in enterprise, but not in community as
it doesn't have the burger menu.
After: The menu is set to always be displayed. To remove it becomes
an enterprise reponsability.
closesodoo/odoo#78033
X-original-commit: 3b18f1cf8cfdbc497c8acba67970e835dabc2eb2
Related: odoo/enterprise#21534
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
With this, tooltips specified with the "data-tooltip" attribute in
owl templates will be translated.
closesodoo/odoo#78031
X-original-commit: 238f275e6d7e536764b7dbc3e7573dbc082804a9
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit just adds a comment to enlighten a developper on how the actual
data of localization is loaded.
closesodoo/odoo#77966
X-original-commit: 73e7628fa1a850e97cd859d1c67d817fc323d155
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
During the adaptation from jinja to qweb, the call to the master_input
was commented, This commit uncomment the call.
closesodoo/odoo#77918
X-original-commit: fae5e1c76ea3fca7b39e67d37f17beedeb391cb9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Automatically create and open a new channel, then start a call, on click
on the "Start a meeting" button.
Part of task-2651831.
closesodoo/odoo#77946
X-original-commit: cedc8e934bf8c97f94f455389315f9f4c40137c7
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
There is multiple issue with the palette in the frontend:
First, the command palette is bound to CTRL+K, which need to be bound to link
creation as this is an universal keybind, as CTRL+P CTRL+F are, as any other
edition app in the world does.
(Note that link creation is not only for edit mode but also for end user, eg
forum post)
History of the keybind:
1. Command palette was introduced with CTRL+K
2. The keybind was changed to CTRL+M to restore CTRL+K for link edition, see
8727ed2766
3. The keybind change was reverted and command back to CTRL+K, as CTRL+M can't
be used on MAC
Second, the command palette do not correctly work in the frontend, the menu are
not opened when an entry is selected, and the submenu are not shown in the palette
when the menu was opened before opening the palette.
Lastly, the CTRL+K in frontend does not only open the command palette but it
also create a link in the background of the palette being opened.. which
result in very bad usability..
The one expecting a link has to deal with a palette.
The one expecting a palette has had a link created without really noticing it.
task-2659885
closesodoo/odoo#77879
X-original-commit: 6135b04738a58564592f438364f5a147ce9c471f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>