Before this commit, the tooltip content of a tour had a font-size set in
rem. As its container dimensions were computed using the root element
font-size, these dimensions were not correct if the tip was inserted in
a document with another root element font-size.
This was leading to a bug after [1] added an iframe to edit the website:
the backend and frontend root elements font-size are different and the
containers of tips targeting frontend elements were clipped.
This commit fixes the tooltip content font-size in px (with the
font-size used to compute the container dimensions), so that it can be
placed in iframes with a different root element font-size.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-3035156
closesodoo/odoo#106746
X-original-commit: 8703c01d0c0c84331e4d4adb00c8def962635e17
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the website homepage tour was starting with an
unresolvable "Wait for the editor to be started", useful only for tests.
This commit removes that technical step for user tours.
task-3035156
X-original-commit: d45ce39b2904bcb4335f74fab3c42f3eebf477d5
Part-of: odoo/odoo#106746
Co-authored-by: qsm-odoo <qsm@odoo.com>
Issue:
At anypoint we should be able to call the method "_set_lot_ids" from stock.move on moves that are already done and the quantities should not change.
This is not the case for lots that get their quantity changes to 1 as if the product was tracked by serial number.
This commit should be seen a a complement to the commit: https://github.com/odoo/odoo/pull/79565
Fix:
Check the product is tracked by SN before trying to change the quantities to 1.
Related ticket: 2689724
closesodoo/odoo#91769
X-original-commit: b56f96d6d63435d629f0a8137a038dacaf0782fe
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
1/ When approving / refusing a leave spanning multiple days, the
overtimes were only recomputed for the starting date and not the
whole period.
2/ Overtimes should be computed whatever the kind of time off that's
been taken (Absence or Other).
task-3073155
closesodoo/odoo#106751
X-original-commit: 116d7cb46132404354e00e67a2364b8239fcdce5
Signed-off-by: Kevin Baptiste <kba@odoo.com>
In Odoo 16, we redesigned the `Accounting > Miscellaneous` menu to
provide a convenient interface for inspecting any journal entry or
journal item.
As such, it no longer makes sense to call it 'Miscellaneous'.
This commit aligns the name with the new functionality.
We also remove the default filter of the 'Journal Entries' view, which
restricted it to miscellaneous entries, and replace it with a filter
on posted entries, consistent with the purpose of conveniently
inspecting the accounting journals.
closesodoo/odoo#106749
Task: 3083921
X-original-commit: ee551d74557b889a463bd7dff234ff5f12539e4a
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Columns added with the "columns" Powerbox commands should be aligned
with the editable element's bounds.
task-3001988
closesodoo/odoo#106747
X-original-commit: fb55f688f6be2211ebeea4ba431a06230c40fb6b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When entering edit mode, the navbar is hidden. The problem is that since
the merge of the website-in-backend feature at [1], it is only not shown
via an animation (height 0 + out of screen) but not `display: none`. The
tour system thus thinks it is still shown and keeps showing the related
tour tips.
E.g. with website_sale installed (and no demo data, to have the tours),
go on the shop page, there is a tooltip pointing at "+ New", enter edit
mode => the tooltip is still there and it even prevents to click on
"Discard" to leave the edit mode.
This commit fixes the issue by making the navbar `display: none` once
the closing animations are finished.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-3082439
closesodoo/odoo#106735
X-original-commit: cdc8d4c889b316664323afad0d848403960150d5
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
While showcasing your website inside the website application, there is
the possibility to hit the escape key to enter fullscreen (hiding the
backend navbar outside edit mode and the editor panel during edit mode).
There was a problem following this flow:
- Go to your website inside your website app
- Hit escape to enter fullscreen
- Press CTRL-K to switch to another part of the backend
=> You are now somewhere in the backend, without the navbar (fullscreen)
and you cannot exit it.
As it was a one-line fix (except for the re-indentation), this commit
now allows to exit fullscreen mode wherever we are.
Discovered during task-3082439
X-original-commit: bd225ec782e26c87301e9e786ffd7250ad62ebfc
Part-of: odoo/odoo#106735
Current behavior before fix:
In mobile view when we click invite button on events module which loads the
snippet, at that time there was a traceback.
Desired behavior after fix:
Now the snippet gets loaded without any traceback.
Task-2994261
closesodoo/odoo#106734
X-original-commit: 634f6ae4d4208f0551bc2b81c359915eb47316b5
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Previously, when calling error handlers, we would give them a new error
created by the error service, as well as an `originalError` which is the
error that was caught by the error service. In some cases, this error is
part of an error chain, eg: errors that happen in the owl lifecycle are
wrapped in an `OwlError`, so that when an error occurs in a callback
passed to a lifecycle hook, the position where the hook was called to
register the offending callback is part of the stack trace.
In practice, most error handlers only care about the error that caused
the entire error chain (the root) when deciding whether they should
handle the error or not, eg: an RPCError should be handled by the rpc
error handler, regardless of whether it occured in an event handler or
in a component's willStart. It already reads the traceback to display on
the UncaughtError provided by the error service as this traceback
contains the entire error chain stack information and is annotated with
source maps by the error service.
This commit makes it so that the `originalError` passed to handlers is
now the root of the error chain, it also sets the `cause` of the
UncaughtError which is passed to handlers as the error that was caught
by the error service, so that if a handler needs to inspect the error
chain to know whether it can handle the error or not, it can still do
that.
related to OPW-3069633
closesodoo/odoo#106720
X-original-commit: dd6f103b1635868e03a7aa40eb7186861d22d377
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Since the Bootstrap 5 migration the "headings" `<h1>`, `<h2>`, ... are
smaller than before.
This commit, restores the old CSS rules from Bootstrap 4 for reports.
Steps to reproduce:
* Open Sales
* Select a quotation
* Print the Quotation (using Print dropdown) => BUG title is smaller
than the old version of Odoo (e.g. Odoo v15)
closesodoo/odoo#106721
X-original-commit: 76299a8d63e85249d30d864a777c2f142ea5daf5
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
The default hours of a time off created from the Day view would be the
range of hours that was selected in the calendar view, thus resulting in
leaves of half an hour.
closesodoo/odoo#106719
X-original-commit: 1ea102d4a2d62308c6dfaa7c3a71fdc4c6c4db85
Signed-off-by: Kevin Baptiste <kba@odoo.com>
In kanban view, the columns are in a flex container and as there is no
specific flex rules on the quick create column and is shrink by
default. So when the new column is above the edge of the viewport, it
starts to shrink.
To avoid this bug we have added the same flex rules has the kanban
column.
Steps to reproduce:
* Open Note
* Create many new column => BUG text wrapped when the new column reach
the width of the viewport.
closesodoo/odoo#106683
X-original-commit: 62b692b6edd7d57ef14c02ecd5b731c8ba664b98
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Before this commit when creating a mailing contact with a mailing
list opt_out at creation the unsubscription_date wasn't set.
Indeed, from the mailing contact view the mailing list uses an
editable list that passes all the values at create even when not set
contrary to when one update the contact only the changed values are
passed. This commit fix this issue.
Task-3070852
closesodoo/odoo#106682
X-original-commit: e7c22094068ce5cdff7f30178cea6d4f39f09137
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Hoste Patrick (pko) <pko@odoo.com>
Before this PR Odoo don't pre-search on location.
closesodoo/odoo#106680
X-original-commit: 55729e2bfb402e5af6569c8dd19ee8495fa244a9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
There was a typo in the color_field xml not allowing to disable the
pop-up in case of readonly. A test validates the feature is active.
The color_field now displays the transparent symbol (instead of black
color) in case the color is undefined.
The product configurator also displays the transparent symbol for
undefined non-custom colors.
task-3013110
closesodoo/odoo#106669
X-original-commit: c67c32c2dbe10b4885ec1177852839b3d18ecf05
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
PURPOSE
Purpose of this task is to cleanup attachment management done in composer overrides
in account modules and move it to model.
SPECIFICATIONS
Accounting holds code to handle attachments linked to their custom composer
(``account.invoice.send``) that uses through inheritance the mail composer
(``mail.compose.message``) that has a specific processing of attachments
to link pending composer attachments to the right records. Move it as a classic
model override for account.move
Account_edi and various l10n submodules hold some custom code to generate and
handle EDI attachments. It is used to add attachments linked using AccountMove
specific 'edi_document_ids' field when sending emails based on templates.
Move it as a classic model override for account.move and account.edi.document.
Move model-specific overrides of the mail composer directly at model level in
purchase and (website_)sale.
Update some naming and docstrings accordingly. See sub commits for more
details.
LINKS
Task-2710804 (Mail: Clean MailThread API)
Task-2792146 (Mail: Move model-dependent code from composer / template)
closesodoo/odoo#106658
Related: odoo/enterprise#34439
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Purpose of this task is to cleanup attachment management done in generic mail
models overrides and move it in account as model overrides.
SPECIFICATIONS
Account_edi and various l10n submodules hold some custom code to generate and
handle EDI attachments. It is used to add attachments linked using AccountMove
specific 'edi_document_ids' field when sending emails based on templates.
Currently MailTemplate is overridden in accounting modules to hold code related
to AccountMove and AccountEdiDocument attachments manipulation. This is linked
to EDI and report naming, not mail specific. This should therefore not be
implemented at template level, but in those specific models.
For that purpose we introduce a method in MailThread that allow to handle
attachments when being in a template context. An override in account_edi
allows to implement its specific behavior.
By the way an old docstring in l10n_it_edi that was quite unrelated to the
override is also removed, as it was more confusing than helping.
Task-2792146 (Mail: Move model-dependent code from composer / template)
Task-2710804 (Mail: Clean MailThread API)
Part-of: odoo/odoo#106658
PURPOSE
Purpose of this task is to cleanup attachment management done in generic mail
models overrides and move it in account as model overrides.
SPECIFICATIONS
Update addons
* in purchase and sale: context key update should be done at message_post
level, especially this is not used in mass mailing mode;
* in website_sale: code to update sale order to avoid sending recovery
emails several times belongs to a "post hook" method on sale order model;
* in loyalty: remove a deprecated / unsupported 'mark_coupon_as_sent' key;
Task-2792146 (Mail: Move model-dependent code from composer / template)
Part-of: odoo/odoo#106658
Purpose of this commit is to try to make code a bit easier to follow using
dicts, sets and tuples, as well as updating some variable names.
Also rename the method to be clearer. Tools methods may omit the namespacing
to avoid too much confusion in naming.
Task-2710804 (Mail: Clean MailThread API)
Part-of: odoo/odoo#106658
PURPOSE
Purpose of this task is to cleanup attachment management done in generic mail
models overrides and move it in account as model overrides.
SPECIFICATIONS
Accounting holds code to handle attachments linked to their custom composer
(``account.invoice.send``) that uses through inheritance the mail composer
(``mail.compose.message``) that has a specific processing of attachments
to link pending composer attachments to the right records.
Indeed attachments linked to the composer are pending attachments, and are
linked to the record when posting the message. This allows to know which
attachments have been added by the user, have specific rules for access
rights, ...
However this code has been wrongly added directly at mixing level at
odoo/odoo@bdcc012004. Instead ``_message_post_process_attachments`` method
should always be called based on a record, allowing to locate the override
at model level.
Task-2792146 (Mail: Move model-dependent code from composer / template)
Task-2710804 (Mail: Clean MailThread API)
Part-of: odoo/odoo#106658
Purpose is to make a section that will cover pre- and post- process methods
for posting or mailing records.
Task-2710804 (Mail: Clean MailThread API)
Part-of: odoo/odoo#106658
Before this commit Projects in overtime filter does not return
project as expected after project has allocated hours to set
on then.
This commit fixes by taking allocated hours into account to
search for project that are in over time.
task-3000817
closesodoo/odoo#106657
X-original-commit: cbd091cb088fba44c14c27dbbc9e8ca098742da1
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit:
1. Create PO with quantity 10, confirm (creates receipt-1)
2. Receive 2 quantities on first receipt (receipt-1), backorder (receipt-1 is 'done', creates receipt-2)
3. Receive 3 quantities on second receipt (receipt-2), backorder (receipt-2 is 'done', creates receipt-3)
4. Change quantity to 5 in PO
5. An exception is created on all receipts (1, 2 and 3)
In the scenario above, receipt-1 and receipt-2 are partial receipts that are set to 'done'.
It is not necessary to create an exception in these receipts when the quantity is changed to less than originally expected in the PO.
Since the system checks that the new quantity has to be equal or greater than the received quantities, the already received quantities cannot be impacted.
After this commit:
The exception is only propagated to the receipts that are not done.
e.g. in the example above, an exception appears only in receipt-3.
task-2648209
resolves#76297closesodoo/odoo#106633
X-original-commit: d6fad232c3dd4a4f7cd54bd255b75314d54ed065
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
- Currently the label of the lines is not limited to the number of characters. When the user gives a name that is too long, the graph will not be displayed.
- This commit limits the number of labels, if exceeded it will display as ...
closesodoo/odoo#106623
X-original-commit: 54657151957c5be5e885c245db9e1830709833c0
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Only active boms should be returned by the domain even if
they match a product id.
closesodoo/odoo#106615
X-original-commit: 2a73890d304476833d76bac9a36ef92f12f267a3
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Quick feedback from client, this is following [1] that added a button
next to the URL input of `we-urlpicket` to be able to preview the link.
The wording was not great, it gives the impression it's an option to
chose to have that URL opened in new tab (eg when form is submitted).
Also, giving it the style of a conventional we-button was also giving
the same impression that it was actually an option that you could click
on to enable something.
Changing the wording and the style of those special we-button should
reduce the confusion.
Arguably, one might think about the usefulness of this button but it
acts as the counterpart of the regular links which have a "Open in new
tab" possibility when hovering the link in their preview tooltip.
[1]: https://github.com/odoo/odoo/commit/acdf3cf7f5aebd803ffa1507e81ed8801727a03a
opw-3060966
closesodoo/odoo#106538
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
**Before this commit**
When a popover is shown and then repositioned to a different placement
(i.e. due to window scrolling or resize), its arrow is misplaced.
This is due to the fact that classnames added in order to correctly place
its arrow are just added to the previous ones instead of replacing all
the needed classnames.
**After this commit**
The classnames are now properly replaced instead of just being appended.
closesodoo/odoo#106495
X-original-commit: c54cc2f87930147b5addb6f447574c677ef3504d
Signed-off-by: Luca Vitali <luvi@odoo.com>
As of 16.1, the ecmascript version accepted in odoo is 2022.
This basically makes escheck almost irrelevant.
Escheck being only able to check up to the version 2021, it can be
removed safely.
closesodoo/odoo#106052
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Upon instantiation of a LinkTools object, the forceNewWindow property is
now added to the options object. This allows us to take advantage of the
pre-exisiting mechanism to conditionally display the "open new window"
checkbox in the LinkTools widget
(odoo/addons/web_editor/static/src/xml/wysiwyg.xml:334).
The possibily of not having the checkbox in the DOM demanded a
modification of LinkTools._isNewWindow().
_isFromAnotherHostName(), being used by both LinkDialog and LinkTools,
was moved to their parent class Link.
task# 2789222
closesodoo/odoo#104923
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
- Description:
- project: Apply default filters when selecting a 'blocked by'
task in task form (project.task form view > blocked by notebook >
add a line > apply a default filter on the current project and on
open tasks)
- project, hr_timesheet: uniformize remaining hours display in
kanban view for tasks and projects (project.project kanban view:
add a frame around remaining hours. The color of the frame follows
the same rules as the one used in project.task kanban view)
task-3034806
closesodoo/odoo#104250
Related: odoo/enterprise#33309
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Because of css limitation, the child of a parent that define a
text-decoration cannot "neutralize" that decoration defined by its
parent with a css property (ie. the text-decoration cannot be
overridden).
When a block define an inline style or any tag that have a class, the
method `formatSelection` tries to "neutralize" the style by calling
`addNeutralStyle`. As it is impossible to "neutralize" the style for
underline nor strikeThrough, there is no method `addNeutralStyle`
defined for those properties.
Before this commit the method `formatSelection` was crashing because
`addNeutralStyle` was not defined.
Task-3002123
closesodoo/odoo#106635
X-original-commit: ce068a3113204dc558e69e88f1d2d778fa446c73
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When a one2many is used as a search default, its label has to be fetch
via a name_get in order to get a correct display of the facet
corresponding to that field in the search bar. It turns out that the
search model did not wait properly the return of the name_gets before to
start to compute the facets.
closesodoo/odoo#106624
X-original-commit: 50f58212410b321c1c4ad3d42a91cd1d23567308
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When rendering, the form view looks for the element it should autofocus,
and defaults to the first text input it finds. This extends that default
behavior to the first textarea or contenteditable element.
closesodoo/odoo#106622
X-original-commit: 82a98715ae2937bff8b58212c452a28d0b28e102
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When rendering a form view that has a truthy `default_focus` attribute,
the renderer looks for the element in its tree that has its `name` as
`id`. However in the case of `html_field` it couldn't find it since
`html_field` failed to apply that `id` to its focusable element (the
editable root). This adds the `id` to the editable root when rendering
the element in `wysiwyg`, and also directly applies `contenteditable` to
it so the `focus` method actually does what we expect it to, even though
we are waiting for `HtmlFieldWysiwygAdapterComponent` to be mounted
before actually instantiating the editor itself.
task-3073096
X-original-commit: 7e14e2a9c055f5b30b7510ffad994fa10196e34d
Part-of: odoo/odoo#106622
In large database with lot of user, the browser don't respond.
closesodoo/odoo#106640
X-original-commit: 0f597b3a9c4110d2984000c21564cc95e61491c4
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
In this commit [1] (merged in 16.0) a bugfix has been made in the
`removeSlide` function but this one should have been applied on all
supported versions because the bug it fixes is present on all versions.
The bug it fixes is the following:
- Drop a carousel block on a page
- Remove the *first* slide
=> There is no active indicator.
Moreover, the bugfix made in 16.0 [1] introduces another error: when a
slide is removed from the carousel the indicators are not in a correct
state anymore.
Following the same steps with the changes of [1]:
- Drop a carousel block on a page
- Remove a slide
=> Indicators are no longer consistent with the slides so tracebacks
appear during the carousel slides. The list of indicators must have on
each element a `data-slide-to` attribute which must reflect the
position of the slide (starting with 0).
So this commit is to backport the fix from 16.0 [1] to 14.0 and to fix
the new bug that [1] introduces.
[1]: https://github.com/odoo/odoo/commit/f7055d3dbabfbe471f490bd65c2032f5251f3f37
task-3040931
opw-3051615
closesodoo/odoo#106639
X-original-commit: 212e8ce620f6eb95aeff6426e06cb29b2c06d0c1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When creating draft deferred entries in a reconcilable account,
we should not attempt to reconcile them, because only posted entries
can be reconciled.
closesodoo/odoo#106603
X-original-commit: edaf019eac9124cb64c0a1dce55291d40b542256
Signed-off-by: William André (wan) <wan@odoo.com>
Before this commit, the buttons to scroll to the next element might not
work if the next element was invisible.
Steps to reproduce the bug fixed by this commit:
(Note that these steps are only reproducible from 15.0. We decided to
merge this fix in 14.0 to be custo-friendly)
- Install two languages on a website
- Drop a cover block (1), with a height of 100% and a scroll down button
- Drop a new block (2) only visible for language B below the block 1
- Drop a new block (3) visible for everyone below the block 2
- Save and go to the site in language A
- Click on the scroll down button
=> No scroll at all while the user expects to scroll to the block
visible to everyone (3). This commit fixes that by making the user
scroll down to see the next visible element.
opw-2967706
closesodoo/odoo#106477
X-original-commit: 076d7ac7795f86d48b532b6c2a1ff76e4503604e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
With commit [1] we refactored the cookies bar to let the user decide if
he wants to accept the cookies (and/or only part of it).
Before that commit, the `website_cookies_bar` cookie could only hold
`true` as value, which now is holding an object like
`{"required": true, "optional": false}`.
This creates an issue if a user is coming from a previous version with
`true` as cookie value because since the refactoring it will crash both
in JS and PY because `in` instruction with a boolean value will fail in
both languages.
The decision taken here is simply to remove the cookie if we face such a
case so the user can decide again what he wants (since there is more
choices now).
It also means that we won't be holding an outdated value in the cookie
any longer.
[1]: https://github.com/odoo/odoo/commit/2cbda6c98ee947cea1d06c09880eee8c758304a8
opw-3074303
closesodoo/odoo#106621
X-original-commit: 22392755ed4c504e6ba2a5a9c9eb6643f2c95994
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>