Since form views are always visible in edition mode, it was no longer
possible to click on the phone number to start a call. Now, a button
is displayed next to the input, allowing the call to start despite
the state of the view.
Tests have been adapted to assert the presence of the button.
Enterprise PR: https://github.com/odoo/enterprise/pull/31954
X-original-commit: 4ac2f17ce6279aa745b1a930f52b86635a04753c
Part-of: odoo/odoo#101786
This PR https://github.com/odoo/odoo/pull/97805 wrongly assumed that
self contained a single workorder. This would raise an error if there
were multiple records in self.
Solution:
Modify calls on `self` to `workorder` (as we already iterate through
them)
closesodoo/odoo#101775
X-original-commit: 26cb902e603d6d576957d1d329d3eef4e76af5f8
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
This reverts commit 3a7349d02b6b667c890af2f197a3640d875b804e.
This toolbar being more accessible in mobile (scrolling to access all
the buttons), sadly it broke the toolbar's dropdown...
closesodoo/odoo#101766
X-original-commit: 253152d93f381ba0e55787818294aaee24383e0a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Always edit mode comes with several layout and behavioral changes that may necessitate changes in tours (both in terms of selectors for the tips and in terms of content, e.g. since "Save" steps are now kind of redundant).
closesodoo/odoo#101729
Forward-port-of: odoo/odoo#101328
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
Some events might not bubble up to a tour tip because the owl template
will have a on.click.stop handler, which prevents propagation up the
tree.
Bypass this limitation (before we find, perhaps, a better solution)
by carefully choosing a selector that works for both legacy and owl
fields (since some fields might still be legacy right now).
X-original-commit: de2942131fb7777e78e9f2d0bbda4dc98f2ba230
Part-of: odoo/odoo#101729
Slightly modify the view as well, including now showing the
'attach receipt' button before the first save (as it will trigger
a save a work properly since its migration to owl).
X-original-commit: 283779a8999b6ae93996bafb46b879dc6a3e0112
Part-of: odoo/odoo#101729
Prior to this commit, the WysiwygAdapter would crash with a TB if an
event reached the wysiwyg_adapter when the websiteRootInstance was no
longer accessible (in case of a PageReload while an event in the mutex
is still trying to fire events).
Note that normally, events should not be sent when the
websiteRootInstance is gone as the editor should be destroyed. But
since "widgets_start_request" triggers also implement a "onFailure", it
seems right to use that in such case.
closesodoo/odoo#101687
X-original-commit: 0cc206f94151e2da646064e265e14a341daff58a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit solves an issue detailed below, where an action would be
scheduled while the page is meant to be reloaded, creating a deadlock.
Commit [1] reviewed the hamburger option and introduced a hack so that
if the no-hamburger option is selected while a template which requires
a hamburger is also selected, the option for the default hamburger is
automatically selected.
This is done with a hack that clicks on a button when the ui of the
option is updated. The issue is that the click creates a subsequent ui
update, and since the value will only be updated once the page reloads,
a second click occurs, which triggers a second save request.
With [2] that save request locks the editor because the wysiwyg_adapter
does not expect a second save_request, and starts a second blockUI which
is never removed once the iframe is reloaded.
This commit ensures that the auto-update click happens only once.
Steps to reproduce:
- Edit your website
- Click on the navbar
- Select the Mobile Menu option "Same as desktop"
- Change the header template for one with a hamburger menu
- Click on the navbar => the editor is locked forever.
[1]: https://github.com/odoo/odoo/commit/6854ff8026999a2de20d163ff7118a59c33064c8
[2]: https://github.com/odoo/odoo/commit/03c552690b15cbf2e7d6b7812386ac64042219af
X-original-commit: 15dc96bdf626940b3493e02998f9534d9f393a70
Part-of: odoo/odoo#101687
Commit [1] moved the switchable views inside a SnippetOption. The
implementation of that ended up creating empty page options
SnippetEditors displayed on every page.
This commit makes sure that if a SnippetEditor doesn't have any options,
it is not displayed.
[1]: https://github.com/odoo/odoo/commit/69af7dcfeb3ff95c40b00ef0cc7c5c0e4021f9d2
task-2687506
X-original-commit: 39d073ccafddf4b3fbe9ec9f5f11849d77c9bdaa
Part-of: odoo/odoo#101687
This commit fixes the issue where the undo of the resizing of an
element is not done in one step.
Steps to reproduce:
- drop a snippet (like text-image)
- resize the image
- undo
=> you have to click multiple times before going back to the initial
size.
task-2968749
closesodoo/odoo#101693
X-original-commit: c4b8a2a6a7548e8a81d1ded58e6bc0e309b02975
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The tax group model doesn't have a form view leading to a left side
bigger than the right side and some fields showing that we don't
want to see.
Thus, we add a form view and hide the field country_code, that is
not needed here since we already see the country_id.
closesodoo/odoo#101519
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
DOMPurify.sanitize removes an attribute that contains a ">" for security
reasons. Make an exception for `data-behavior-props`.
That exception allows Embedded views in Knowledge to store a JSON object
containing the act_window data used to render it as an attribute of the
HTMLElement where it is supposed to be rendered (The view contents are
not saved in the html_field value).
More generally, data-behavior-props should be used when storing properties for a
Behavior Component (see Knowledge module) is required.
Prepares Task-2796156
Prepares odoo/enterprise#29423
X-original-commit: aeb9df5247a3936b1397d8056c1725a1de660b6a
Part-of: odoo/odoo#101694
Add a custom class in web_editor to prevent the selection in an embedded view
(or another bloc using that class) from being moved out in multiple situations.
(onselectionchange, onkeyup, onmouseup, ...).
This is related to the block being contentEditable=False.
Prepares Task-2796156
Prepares odoo/enterprise#29423
X-original-commit: 86c14110294c5ff986ee88bb010dbc7513bf8b01
Part-of: odoo/odoo#101694
Purpose
Allow users to copy/paste specific elements that are generated by Odoo instead
of sanitizing it on paste. It allows to keep structured data in DOM.
Prepares Task-2796156
Prepares odoo/enterprise#29423
X-original-commit: 36ed4db2b378543d51e6e3eb03962707dbf15b1d
Part-of: odoo/odoo#101694
Purpose is to allow to have ``data-behavior-props`` and ``data-prop-name``
on HTML nodes and keep it even when HTML content is sanitized. Those attributes
will be used notably in Knowledge application to store some structured content
e.g. used to populate props.
Prepares Task-2796156
Prepares odoo/enterprise#29423
X-original-commit: 7ddb4685567c115ca4e14fa7e5f845b0cb33fd7c
Part-of: odoo/odoo#101694
When we introduced the `useSortable` hook [1] and [2], the kanban column
fit the size of the kanban record when the DnD record hovers the column.
This behavior is not desired when the record is hovering over a folded
column, so we apply now a `display:none` value on the record to avoid
the resize of the column.
Steps to reproduce:
1. Go to project
2. Open Office design
3. Try to drag and drop a record to a folded column
The width of the folded column is incremented to the width of the
record => bug
Links:
1. https://github.com/odoo/odoo/commit/ebb410accbe3aac051e73031384f640a40544efc
2. https://github.com/odoo/odoo/commit/cf4a8f198fd2daa2b4d9f9f69c5c769c21ff13c5closesodoo/odoo#101690
X-original-commit: 94e4d6fb432fe64dedf1e65a6ab021855d4c955e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
1. change system and admin's time zone to one with a different
date than UTC
2. enable multi-currency in the accounting module
3. add rates for the current date in local time zone and UTC
4. go to settings > currencies
5. the rate for the UTC date is displayed
To fix this, we should use a time zone aware field in `res_currency`.
opw-2945108
closesodoo/odoo#101686
X-original-commit: 2f1d8d6db4efab86d35f362138e80e03692537dd
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Khanalizadeh Ahmad (khah) <khah@odoo.com>
If a user imports a FacturX where an item has a name but no description, the invoice is not created.
We now use the item name as a fallback in case there is no description.
opw-2951705
closesodoo/odoo#101682
X-original-commit: 8826993ffb658d6df513a3ce4a316c1aa09d428e
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Ricardo Gomes Rodrigues (rigr) <rigr@odoo.com>
Preview of accrued entries should occupy full width.
closesodoo/odoo#101680
X-original-commit: 046dbe3ed48054b0c390ae1edb2e1dea9315acfb
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Before this commit
Can display the color list picker event if no color_field has been set.
This could lead to a traceback if a color is selected.
After this commit
The field does not allow to show the color list without a color_field.
closesodoo/odoo#101679
X-original-commit: 160ba4b4edfde052d9881a23294ceafc0ceec278
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
If website is installed, the login page of Odoo has opengraph meta that will be
used to create link preview on mention and channel link.
This PR add a xpath condition to always ignore mention and channel link in the
message body.
Part of task-3000274
closesodoo/odoo#101678
X-original-commit: eb032a5c36af6402b79ae768ce29b3d84eacf3b7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Debondt Didier (did) <did@odoo.com>
This helps tracking views that still need to be converted, like we
already do for fields.
closesodoo/odoo#101676
X-original-commit: aea1b4af1d88b19392eb9f42a42fd970017d5630
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Imported unsplash in web_editor when it was not a dependency.
This caused the test to fail when web_unsplash was not installed.
As it is necessary to import it when the module is installed,
this test is moved to test_website as both modules are installed there.
(Also updated to ES6 import syntax + odoo-module style test)
task #3000801closesodoo/odoo#101672
X-original-commit: d85ba585ec4642a507d24ab94606a65970c635f3
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Since that commit: dd7f4d501a4d23b04a1899be8fd51cc583673c9d
A picking type cannot make the scan of the source location mandatory if
the scan of the destination source is optional.
An error is raised in case the user tries to edit and save a picking
types with this erronous config but there is also an issue if the user
tries to set the outgoing shipments in 2 or 3 steps.
The method `_create_or_update_sequences_and_picking_types` was the cause
of this issue because of an `update` on the `stock.picking.type`.
We try to update `restrict_scan_source_location` to "mandatory" and
`restrict_scan_dest_location` to "no" for the pick operation, the issue
is with `update`, each field is write one by one, and so, it will write
on `restrict_scan_source_location` first while `restrict_scan_dest_location`
is still set on "optional".
To fix that, we replace the `update` by a `write`.
closesodoo/odoo#101663
X-original-commit: 07fb4af8c68ae1296e796c2f3714823ed828e680
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Steve Van Essche <svs@odoo.com>
Odoo charts have a specific need of dataSources for their runtime data
(in oppostion to standard graphs). In order to link the chart with its
datasource, we injected the chart id inside its definition in order to
be able to fetch the corresponding datasource. Unfortunately, this
approach require that we can access the chartId from anywhere which is
unfortunately not the case when we copy/cut/paste a chart. The current
implementation would copy the chart while keeping a reference to the
same datasource, thereby keeping the same data and be submitted to the
same filters as the original chart dataSource.
Note that a chart should not be aware of its own id; that is, its place
in the mapping of a plugin.
This commit changes the approach to set the dataSource inside the chart
directly through a method only available on OdooChart instances.
This problem would also arise on sheet duplication but was due to a
problem in the library itself.
task 2998207
closesodoo/odoo#101660
X-original-commit: 47f7cc08bec749301001c6c4567cafbcea8bd552
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Previous versions of spreadsheet files don't have a name
for list and pivot datasources.
The spreadsheet template "pipeline dashboard" in `document_spreadsheet_crm`
is such a file.
As a consequence, exporting the source terms from this module fails
with a `KeyError: 'name'`
Part-of: odoo/odoo#101659
Prior, by default Skill history report goes to stacked view.
Which is not informative for the kind of information that is displayed.
task - 2993831
closesodoo/odoo#101656
X-original-commit: 1951b56d91dc17ec8d81257e8c431f7a24420e2b
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Purpose:
========
Knowledge allows to search images from unsplash when selecting a cover
for an article. One would like to show only images with a landscape
orientation when selecting a cover, since images with other orientations
do not fit properly.
Also made "UnsplashError" component exportable so that it can be used
in Knowledge,'s Cover Selector.
Specs:
======
Modified unsplash_service and image_selector so that one can specify
the orientation of the images to fetch from unsplash.
Added the orientation as cache key so that images in cache are not shown
when using the same query word but with another orientation (eg. in
knowledge, search an image for the body of the article then searching a
cover using the same query term).
Task-2852916
closesodoo/odoo#101671
X-original-commit: e65d5d617bd13cf0381b372205a07a4a3bef2963
Related: odoo/enterprise#32050
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit fixes the display of files in list and in the BinaryField,
which was displaying the complete file value instead of a human readable
size.
A new formatter has been added, and the isBinSize utils has been added
to its own utils file instead of depending from the field.
A test has been added to verify the correct visibility of a file in a
list view instead of showing the file content.
closesodoo/odoo#101673
X-original-commit: ff8485b2289a1157cdae608bd4223012fc67b77c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This field has been forgotten in the PR converting all web fields
to wowl.
closesodoo/odoo#101661
X-original-commit: 2e1c78b3818cdcb97afe4cd1496e0da6f8bac1b7
Related: odoo/enterprise#32041
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit removes an unused widget from the field, formatter
and parser registries.
X-original-commit: 6f88435e792fdefe17e0684308482b8c2821c361
Part-of: odoo/odoo#101661
Before this commit, if there was a kanban view with a field with
widget="many2one" explicitely set, the legacy KanbanMany2oneField
was used. That field simply displays the name of the related
record, with no link.
In the wowl kanban view, we only use a FieldComponent if the
field is explicitely set, and we use a formatter otherwise. For
that reason, this commit simply removes the kanban special case
instead of re-introducing it. So by default, a many2one will be
displayed in a span, and if someone wants the link in the kanban
card, he has to set widget="many2one" (this wasn't possible before).
Temporarily, until we remove the fallback on the legacy field
registry, we need to add a "fake" entry in the wowl registry, to
prevent from fallbacking on legacy.
X-original-commit: a3cd97c5c81422e33a5715ecc4dd017cf5172ea8
Part-of: odoo/odoo#101661
This field type has been forgotten in the PR that converts web
fields to wowl, probably because it wasn't tested. This commit
defines a Component and a formatter to use for that field type,
in wowl views, s.t. we no longer rely on the legacy implementation.
X-original-commit: 540e113d107b59af23dc9726a55f5b8376248247
Part-of: odoo/odoo#101661
There are several versions of the CopyClipboard field (char, text,
url). There's also the version where the field's value isn't
displayed (only the copy button is), aka `CopyClipboardButton`.
This one has been forgotten during the owl conversion. This commit
restores it.
X-original-commit: 3dfbfb5b9568b72ebbe7c376cd56ebf056a86c75
Part-of: odoo/odoo#101661
This PR replaces the FormView group tables with css grids.
Part of the overall v16 SCSS optimization/restyle, task-2704984
task-2918464
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#101655
Forward-port-of: odoo/odoo#98911
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>