With this commit, if the user types something in a numeric field
input that doesn't match its localization, we try to parse it with
the english localization. If it works, we considerer that value.
Otherwise, we throw an error.
al request
Part-of: odoo/odoo#92475
This commit rewrites the board action in owl. Legacy actions are
still supported inside this new board thanks to a compatibility
layer.
Part-of: odoo/odoo#92475
This commit refactors the way actions restore their scrolling
positions (when coming back). By default, in desktop, we want the
o_content div of the action to scroll. In mobile, we want the
whole action to scroll (including the ControlPanel). With this
commit, the logic is handled at the concerned level: in the
action hook for the desktop case, and in the action service for
the mobile case.
Part-of: odoo/odoo#92475
This commit makes various adapations in addons with respect to
the introduction of the owl kanban view. Mainly, some selectors
in scss and in tests needed to be adapted. Moreover, in some tests
that we haven't adapted yet, we must ensure that legacy form and
list views are still used (useLegacyViews).
It also contains some adaptations in kanban templates, e.g. the
replacement of moment by luxon, the removal of underscore...
Part-of: odoo/odoo#92475
This commit contains several adaptations of the Layout, WithSearch,
ControlPanel and its children components with respect to the
conversion of kanban, list and form views in owl.
In a nutshell:
- ActionMenus: we didn't have an implementation yet, as already
converted views do not need it.
- ControlPanel: allow to move the focus from the search bar to
the view and vice-versa + slight rework of the template to
properly handle hidden areas.
- CustomFilterItems: adapt to formatter/parser changes.
- Layout: hide breadcrumbs in dialogs and allow to move control
panel buttons in the footer (in dialogs as well)
- WithSearch: only pass search props to the underlying view +
take its content in a default slot
Part-of: odoo/odoo#92475
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
This commit adapts the (form) view debug items to make them work
with the new owl kanban, list and form views, and to make them
use the new owl SelectCreateDialog.
Part-of: odoo/odoo#92475
This commit introduces the new kanban, list and form views written
in owl. Even though it contains the implementation of those 3 views,
only the kanban view is activated for now (the list and form views
aren't 100% ready yet, so they aren't added to the view registry).
Alongside the views, the fields (<field name="..."/> in archs) and
widgets (<widget name="..." in archs) of web/ have been implemented
in owl as well. Legacy ones remaining in other addons are supported
in our new views, thanks to a compatibility layer. The goal is to convert
them asap though.
Legacy views, fields and widgets are kept for now, which explains the
number of added lines in this PR (around half of them concern tests).
They are still extended by custom code in other addons, that still need
to be converted (a lot of them are already on the way). Moreover,
they are still used in Studio as well. The plan is to lazy load them in
the Studio bundle when all custom code extending them will be
converted. Studio will be converted for v17.
Part-of: odoo/odoo#92475
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
This commit is threefold:
1) it improves the style of tooltips (mostly, a larger font size)
2) it adds an option, `data-tooltip-delay` that allows to specify
the delay before the tooltip opens
3) it handles the case where the tooltip is empty (no tooltip
displayed)
Part-of: odoo/odoo#92475
This commit adds two options to the hotkey service to improve its
usability in some cases:
- `area` which is a function that returns an HTMLElement that restricts
the operating area for an hotkey registration
- `validate` which is a function that returns a boolean that tells if
the hotkey registration's callback should be called or not
Some typings adaptations were made in:
- @web/core/commands/command_palette
- @web/core/commands/command_service
- @web/core/utils/ui
Part-of: odoo/odoo#92475
1) Force the cursor: pointer for dropdown items containing a
checkbox (e.g. optional field dropdown in list views)
2) Always stop click events in dropdown togglers as they are
handled
3) Add a test for the "tooltip" props
Part-of: odoo/odoo#92475
This commit introduces a ColorList component which allows to
choose a color from a list. There are several usecases for such
a component in Odoo (e.g. ColorPicker, Many2ManyTags, KanbanRecord).
Part-of: odoo/odoo#92475
This commit introduces the DomainSelector and ModelFieldSelector
components. They will especially be used by the owl DomainField.
Part-of: odoo/odoo#92475
This commit introduces a Notebook component, which displays tabs
and an active page. The component is configurable to display the
notebook vertically (e.g. form views) or horizontally (e.g. kanban
examples dialog).
Part-of: odoo/odoo#92475
This commit introduces an AutoComplete component, which displays
an input and reacts to input events to display a list of suggestions
in a dropdown. The main usecase for this component is the Many2One
field.
Part-of: odoo/odoo#92475
This hook offers an alternative to jQuery UI sortable and
draggable. It's a step in the way to removing jQuery UI. This
hook will be used by the new owl list and kanban views.
Part-of: odoo/odoo#92475
By passing "animationFrame" as delay value, the debounced function
will be called just before the next animation frame following the
moment if has been effectively called.
Part-of: odoo/odoo#92475
This commit is two-fold:
1) events triggered with jQuery do not go through the native
layer, so if an handler has been bound natively, it won't be
called. Since our new code no longer uses jQuery, this caused
issue in some tours.
2) this commit explicitely logs the failing step when a tour
crashes, which helps debugging.
Part-of: odoo/odoo#92475
Before this commit, opening a notification with the className
option would result in a notification being displayed without the
given className. That className was overriden by the transition
className. This commit ensures we keep all classNames.
Part-of: odoo/odoo#92475
In the wowl codebase, we use luxon instead of moment to manipulate
dates. Moment was able to parse dates with short notations (e.g.
08/15/22 for the format MM/DD/YYYY). Luxon is more strict and does
not support those cases (the format must be perfectly respected).
As a consequence, moving from moment to luxon would introduce a
regression in our date and datetime fields. This commit implements
the same kind of logic as what is done in moment, in our date
parsers, such that those cases are handled.
Part-of: odoo/odoo#92475
This commit ensures that keys in the hash or querystring in the url
is URI encoded. Moreover, it properly handles the case where a
value in the hash is falsy. Before this commit, if a value, say "x",
was falsy, it resulted in the url in "x", which produces a crash
when decoding. With this commit, it generates "x=" in that case.
Part-of: odoo/odoo#92475
Steps to reproduce:
- Create an accural plan with two levels, the first should have
its action_with_unused_accruals set as lost. The second should
start one year after the first level.
- Use this plan on a employee and make it start the first day of
the previous year.
Current behavior:
The number of allocated day is wrong and can even be negative
Expected behavior:
The days of the first level are lost and there is the right amount
of allocated days,
Eplanation:
The _end_of_the_year function was first designed to be only called
on the first day of the year but the it changed since then without
updating it's content and it can calle any day of the year now. In
this case the use of today() does not make sense and it should be
replaced by the first day of the current year.
opw-2868297
closesodoo/odoo#94897
X-original-commit: 476818972e93b32df6f25cf299f631a8f7eb3af4
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
It could happen that there are other objects than stock.move linked to
the manufacture order. This is currently creating an error when
concatenating the objects. As we are only keeping stock.move objects to
log the exception on those, we should filter them before the concatenate
operation to avoid the error.
closesodoo/odoo#94893
X-original-commit: 1cdb682163e24fc01677cdcd0e1b83592443fffc
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
Co-authored-by: vancleeff <mvw@odoo.com>
PR #75535 introduced trusted devices, but only made them visible in the
main user form (for admins) and in the portal.
It's quite useful for users to be able to view and manage their trusted
devices in their own user preferences as well.
This commit add them in the "Account Security" of the user profile.
In addition:
- improve the layout of the trusted devices by wrapping them in a
<group> to have them stand out from the surrounding prefs
- move the "Account is protected" label about the trusted devices, and
under main the 2FA toggle button, where it's supposed to be.
- removed the custom form view for trusted devices inside the one2many.
The point was to hide the extra `scope` field, but it's not worth it,
and the Cancel button wasn't even working, the default form view is
better.
- improve the confirmation message of the "Revoke All" button when it's
located on the user management form (for admins) to clarify that it's
not the admin's devices that will be revoked.
- change the 2FA label from "Your Account is protected" to "This account is
protected" when located on the user management form for admins.
Note: this is a manual partial fwd-port of #94111, as this part was
mistakenly dropped in the fwd-port chain at #94193closesodoo/odoo#94869
X-original-commit: d3a7910788ceff856fc6a843876579d379ce9caf
Signed-off-by: Olivier Dony <odo@odoo.com>
*: sms, snailmail.
The createThreadViewComponent helper was used during tests to mount
a thread view component and test it. However, this approach is not
very realistic and blocks some waiting PRs. In order to get closer
from the reality, let's mount a webClient so that the thread view
component can be mounted in its real environment.
task-2871066
closesodoo/odoo#94691
Related: odoo/enterprise#28954
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit
When the user hit ctrl+k on a mass mailing, no command palette nor link
dialog was opening.
This was due to the fact that the hotkey service would not react
to hotkeys being pressed from inside of an iframe element.
After this commit
One can now register an iframe to the hotkey service to let it react
to hotkeys being pressed from within the registered iframes.
task-2738457
closes odoo/odoo#91102
Forward-port-of: #89940
Forward-port-of: #82994
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Whenever the user hit ctrl+k when being on an html field, both the
link dialog and the command palette opened.
In order to resolve the conflict, now ctrl+k open the command palette
with the first entry being the command to open the linktool and
a subsequent hit to ctrl+k when the command palette is open to open
the link dialog.
Task-2738457
Forward-port-of: #89940
Forward-port-of: #82994
Part-of: odoo/odoo#91102
Before this change we would have to use other ways to add filtering forms in e-commerce. For example, using the context of the request in 'product.template' to catch what we need in the _search_get_detail method.
After these changes, we will not need to pass the context of the request outside the controller because it will be the _search_with_fuzzy options that will give us the information we need for inheritance.
closesodoo/odoo#94858
X-original-commit: d29f2f3ac5f8c3e8109287e0933609bdbe0cadb1
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit does a couple of small related improvements:
- adds new delivery options: "Local Delivery".
We replace the existing "Normal Delivery Charges" with the new "Local
Delivery" since it is now redundant.
- Originally a "Local Pickup" demo option was going to be added, but
this appeared redundant with the "[On Site Pick]" added in
odoo/odoo#87636 . Regardless, an additional `carrier_description`
field has been added so users can include extra instructions (e.g.
address to pick up from, when pickup can occur, etc) to sales orders/
confirmation emails (emails only via ecommerce sales).
- adds option to filter based on zip prefix rather than the previous zip
"range" option, which was too restrictive in some cases (e.g. in the
UK where zips can have letters in them). Note that users can view/edit
zip prefixes in menu under settings when debug mode is active. Note:
- prefixes are ordered by name so its easier to read large numbers
prefixes
- prefixes are always capitalized to avoid duplicate prefixes that
differ by case + avoid capitalizing all prefixes every time the
`_match_address` logic is called
Task: 2706451
Upgrade PR: odoo/upgrade#3384closesodoo/odoo#84620
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Description of the issue:
=========================
Suppose we have 3 articles with the following structure:
root
L child
L grand child
When granting the "write" permission to a user in "root", this user
will inherit this permission in "child" and in "grand child".
When we then restrict this user with the "no access" permission in
child, this permission is inherited by grand-child (correct).
Then, when a member is invited in the root article, the right is not
herited by "child" nor "grand child" (correct). However, this
permission is shown as being inherited from "root" in the permission
panel in "grand child" (incorrect: "grand child" does not have this
permission, and is in fact inherited from "child" as expected).
Solution:
=========
Add the boolean "article_is_desynchronized" check in the inner
join condition of the recursive SQL request used to fetch the
permissions of an article and its parents.
This boolean check allows to prune the recursion when an article
is desynchronized, so that the permissions of the parents of this
desynchronized article are not fetched, since they are not
inherited in the desynchronized articles nor in its children.
Some tests have been added to ensure the correct behaviour of the
share panel. Especially, the scenario described in the description of
the issue is tested.
Task-2866950
closesodoo/odoo#94834
X-original-commit: 252fce15f20a13ab3e71f7aafc247b5ac88a354a
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Description of the issue:
=========================
Suppose we have 3 articles with the following structure:
root
L child
L grand child
When restricting the internal permission in 'child', the inherited
permission parent id and the inherited permission of 'grand child'
are not updated, and the share panel shows that the internal
permission of grand child is based on 'root'.
The 2 fields of grand child (and of any other child of 'child' at any
depth) should be recomputed, and the share panel should show that
the internal permission of these children is based on 'child'.
Solution:
=========
Add 'parent_id.inherited_permission_parent_id' as field on which
'_compute_inherited_permission' depends on, so that 'inherited
permission' and 'inherited permission parent id' of the children of
an article are recomputed when the internal permission of this
article changes.
The scenario described in the issue description has been added to the
tests. One now ensures that if an article gets its internal
permission downgraded (either to 'read' or 'none'), the child and the
grand-child of this article have their inherited permission parent id
equal to the article and their inherited permission equal to the
internal permission of the article.
Task-2866950
X-original-commit: ea2d1b64c5f30c6d0e6a704b4f09c43084371b62
Part-of: odoo/odoo#94834
The vertical spacing between images of an images wall was lost when a
link was added to an image.
This commit applies the bottom margin to images even if they are
within a link.
Steps to reproduce:
- Drop an "Images Wall" block.
- Add 4 images to the wall.
- Add a link to the first image.
=> The gap between the two images of the first column disappeared.
task-2818919
closesodoo/odoo#94822
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Create an internal transfer and post it
The system will automatically create the paired payment
Now duplicate the transfer and post it
No paired payment will be created
This occurs because the field paired_internal_transfer_payment_id is
copied to the new record, linking the new intenal transfer to the old
paired payment, so the system will not create a new one
opw-2870995
closesodoo/odoo#94796
X-original-commit: 86a95de1aad3e27dabaf19d5deb4c14bdd87fa1f
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Before this commit, if one of the used payment methods was archived,
it would raise an error when loading the paid orders.
The solution is to load archived payment methods.
opw-2892321
closesodoo/odoo#94687
X-original-commit: 5c7b6bee2bdcaba0a2cde3d22d472e30640d9f09
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>