It should be allowed to pay amount that are not rounded if the value is less than the rounding value.
Ex:
Rounding value: 0.05
Amount to pay: 0.04
The amount to pay should remain 0.04 and not be rounded to 0.05.
This fix allows the user to pay for values under the rounding value without applying the rounding.
closesodoo/odoo#81392
X-original-commit: 523bc2f9b26bbb51ededcb734fa4ec384671575b
Signed-off-by: Masereel Pierre <pim@odoo.com>
The requirement of having real_time valuation in product categories to use LC is not needed
at all, as the information is taken from stock.valuation.layer, but it was previously
enforced due to the leftovers of the previous algorithm.
We remove such requirement in this commit, and also not creating the LC journal entry in
such cases.
TT32954
closesodoo/odoo#81303
X-original-commit: 05af566f7cdbe36fa0a7e07da15b37bd1349ed80
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Arnold Moyaux <arm@odoo.com>
This solution is not perfect. In order to be, we would need to have a
sanitized function that is used to store the number in the database, and
to use the same function to search in it. This will most likely be done
in master with a refactoring of `base_vat`, on which `account` will
depend one way or another.
In the meantime, we need to support cases that were working before these
fixes:
https://github.com/odoo/odoo/commit/bfb2436b9d99bf9eea29ee44000e18197efa88b6https://github.com/odoo/odoo/commit/e24c5ba4efef466919735ec4304cfd46be5f0d3f
Since these, it was indeed impossible to detect a partner based on his
VAT for Swiss partners if `base_vat` was installed, which is the
default.
closesodoo/odoo#81263
X-original-commit: 04aa5cd79c6aca1615ba022c351054a390e6c0b5
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
In owl 2, the t-on directive is no longer supported on components. The
way to handle events on components is to give them a callback as a prop.
This already works in owl 1, so this commit prepares the code for an
easier migration in the future by removing the "dropdown-item-selected"
event and converting the code that was using it to use the new paradigm.
closesodoo/odoo#80684
Related: odoo/enterprise#22722
Signed-off-by: Géry Debongnie <ged@odoo.com>
Currently, bare method calls in arrow functions in templates are bound
to the rendering context/scope. While this gives you access to most of
the things that exist on the component for reading, writing on 'this'
will not always work, and the rendering context can pollute the
component's name space. This commit fixes that by explicitly calling the
method on the instance of the components.
Part-of: odoo/odoo#80684
Rename javascript model `mail.attachment_card` to `AttachmentCard` in
order to distinguish javascript model from python model.
Part of task-2701674.
closesodoo/odoo#80604
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Purpose
=======
When presenting a live survey, the page does not give a
confirmation message when the survey ends and stays on the last slide.
A "Thank you!" message is now displayed when the presentation ends.
Task-2700222
closesodoo/odoo#80447
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The http.addons_manifest is a map {module: manifest_dict} that is
populated upon the first http request. This map is basically a module
manifest cache with an extra `addons_path` key, the path of the module
on the file-system. This cache is eagerly populated upon the first http
request, the map is empty in non-http contextes (e.g. cron) which have
been a source of bugs (e.g. 50c8eb1).
A manifest cache is necessary because reading and parsing python files
from the file-system is not that cheap but there is no reason that cache
is located in `odoo.http`. A thin cache layer now wraps
`load_information_from_description_file()`/`load_manifest()` and is
lazily populated.
The `http.addons_manifest` have been removed. The extra `addons_path`
key is now present in the "normal" manifest. The `read_manifest()` was
hardly used so it has been deprecated. The only way to retrieve a
manifest is now `load_information_from_description_file()` which was
renamed `load_manifest()` (no cache) and `get_manifest()` (cache).
Side note about performances, the cache is necessary. Addons manifest
are read-only and reading + parsing python files from the file system is
not a cheap operation. Running the e-commerce tour
`@website_sale.test_04_admin_website_sale_tour` without cache on
`load_manifest()` requires 68,29 secs to complete on my laptop,
exceeding the default 1-minute time frame allowed in tests. Using a
cache the time is down to 36,53 secs. The performance impact is huge.
Part-of: odoo/odoo#79977
Rename javascript model `mail.media_preview` to `MediaPreview` in order
to distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81373
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, the EditMenuDialog was closed before reloading the
page. [1] introduced a new test on this dialog using a workaround to go
to the next step when saving, after the page was reloaded. This
workaround used an unreliable event 'unload', which was inconsistent.
To avoid using that event, the edit menu dialog is not closed after
saving. A new parameter closeOnSave is added to the wysiwyg Dialog,
which allows to keep the dialog open until the reload is done.
task-2513588
[1]: 725cad3478e5ab12ad7f0cf5166a2b968a1373da
closesodoo/odoo#81351
X-original-commit: d35125cc0444679488fa1a020b6bd8a6c4409b6f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, editing a menu item after clicking on the "edit
menu" button of the link popover, in edit mode, would not save the
change.
This was caused by the "Double-click to edit" tooltip that is shown over
media and links. Triggering the bootstrap tooltip on a target leads to
attribute mutations (data-original-title, title and aria-describedby),
that were processed by the EditPageMenu observer to set a view as
o_dirty.
The website.menu was therefore saved a first time by the edit menu
dialog with the correct value, and a second time with the outdated label
from the page.
To solve that, the observer is deactivated when showing the
"Double-click to edit" tooltip over a link or a media, so that the
website.menu is updated only once, when saving the edit menu dialog.
task-2513588
X-original-commit: 4244b60f36acbdbdc17c24d45144604d1276c15f
Part-of: odoo/odoo#81351
There was an issue when saving the LinkDialog with invalid data.
The _DialogLinkWidget.save methods return values were not consistent.
Also, tests are added for the regular menus edition.
The existing mega menu edition test was not played from the python test
suite.
task-2513588
X-original-commit: 725cad3478e5ab12ad7f0cf5166a2b968a1373da
Part-of: odoo/odoo#81351
Co-authored-by: Arthur Detroux (ard) <ard@odoo.com>
[1] changed the event listener to toggle the link tools and the popover
on links from mousedown to click.
Before that, when clicking on the extra menu items toggle, the mousedown
target was most of the time the icon, so the link tools and the popover
were not initialized. Now, as we listen for the click event, the target
is the <a/> element, for which the tools and the popover are
initialized.
It should not be the case, as this is a technical element that the user
has no control over.
task-2513588
[1]: add3e05840869d4a885ca18a2bbabfcb61c7a83d
X-original-commit: f1f40517be9280c6f770a116e6909a6d147a3e43
Part-of: odoo/odoo#81351
When changing the label of a navbar menu via the link popover "edit
link" button and the menu edition dialog, the label would not be changed
after saving.
Reloading the page would display the updated label.
While the RPC was correctly made to update the website.menu, the editor
would apply a historyRevert after the DOM update to change the menu
label on the page. This change should not be recorded by the editor as a
RPC to update the website.menu is executed at the same time.
task-2513588
X-original-commit: 71ac6244037608cf529586b43946f992b723e7db
Part-of: odoo/odoo#81351
Rename javascript model `mail.discuss_public_view` to `DiscussPublicView` inorder to distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81346
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Rename javascript model `mail.dialog_manager` to `DialogManager` in
order to distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81334
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Rename javascript model `mail.chat_window_manager` to `ChatWindowManager` in order to distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81323
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In Safari (14+) the CSS workaround to make block "readable" over any bg
is broken. By replacing the current CSS workaround by an appropriate
SVG filter in each themes svg, the problem will be fixed.
This commit will remove the CSS workaround.
task-2667028
closesodoo/odoo#81190
X-original-commit: 6b17497f4e29394a704646b287f0d9c8c9839768
Related: odoo/design-themes#538
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
With the previous fix, if the company created an invoice for a
non-EAS client in a journal used for EAS clients, it would raise a UserError.
That behavior was not intended, and is being fixed here.
Related PR odoo/odoo#80740closesodoo/odoo#81360
X-original-commit: 81209239d1ef38ad6c53dd7706d57fb9312bda82
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: John Laterre <jol@odoo.com>
Better aligns the stars with the label when no expected deadline is set,
by styling the parent div to space out non-empty children.
Task-2709761
closesodoo/odoo#81358
X-original-commit: 61925f488557181ae691d222a142a242c939d3e0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Prior to this commit, when we hover on any star icon (from a priority
widget field), we only get the label of a selection value linked with
particular icon. For example, if a 'Priority field is having a selection
values 'Low' and 'High', on hover of the start, we see 'Low' and 'High'
(in the same sequence as selection values).
But sometimes (for example in kanban view, where we don't display the
field label), it is not very clear what they indicate.
This commit improves the behavior by adding a field label also in the
title attribute of the star icons so that users can get a better
understanding of what each selection means. In our example, it will
now display the tooltip as 'Priority: Low' and 'Priority: High'.
Task-2691338
closesodoo/odoo#80213
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Avoid counting requests from social bots (twitter, facebook, linkedin...)
when tracking a link.
Specifications
=============
Social media platforms have a specific user agent in the HTTP headers that
can be used to detect them and to not increment the click count in that case.
Task-2578902
closesodoo/odoo#78806
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The message displayed to the user was not translated
closes#81065closesodoo/odoo#81246
X-original-commit: 9ce8f83f2a7a55a00f73d4522714151e2f8ffc44
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit when covers were edited from their list view (e.g.
changing their background color from the blog posts list or from the
events list), the resize class was lost.
After this commit the resize class is kept from its previously saved
value if it is not a parameter during edition.
Related to task-2359250 and task-2678100
closesodoo/odoo#81349
X-original-commit: 4e5aa57913c4270d0e9de6e7318eb5d25daaddf4
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
It used to be a tuple.
Cf: 1abe965b59
opw-2681777
closesodoo/odoo#81312
X-original-commit: aa74f51db7bf5a8ad1f4e309b6352df3c31037ec
Signed-off-by: Raphael Collet <rco@odoo.com>
Before this commit, an action group_by like "subscription_id" was accepted
in production mode but would make crash a view that uses the WithSearch
component as soon as the dev mode is activated. Here we fix the
problem by making the acion service process the action group_by in order
to make it pass the validation.
closesodoo/odoo#81306
X-original-commit: ea209f126c57ea2f3e456a9b459dd46fd78fc33a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Load an action with a list view with at least one record and open the
view form for a record. Then reload the page and go back in the breadcrumbs.
In desktop mode, one arrives at a list view again.
Before this commit, the search view was not correctly initialized.
The problem was that the list view reuse a globaState prepared by the
form view that contains a search model state that do not reflect the
search view arch (the form view does not use the search view).
We fix that problem by preventing the form view to install the
ControlPanelModelExtension. In that way, the form view does not export
a search model state in the globalState and the list view correctly
process the search view arch.
Task ID: 2697084
X-original-commit: 40e04695ef0de96df8b850fac3f7d165585d466a
Part-of: odoo/odoo#81306
To simplify messaging components in the future, they all need to have a similar
shape. It is done for messaging menu and activity notice in this commit, which
requires to move the waiting on "messaging becoming created" to a parent
non-messaging component.
closesodoo/odoo#80482
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The motivation of this commit comes from breadcrumbs.
Breadcrumbs work as follows: for each controller in the stack of
the ActionService, there is an entry in the breadcrumbs. Except
for the last entry (which corresponds to the currently displayed
controller), the value to display is computed by the ActionService
and stored in this.env.config.breadcrumbs. For the last entry,
we use the displayName set in this.env.config.
When a view wants to update its displayName (e.g. the form view
when we switch to another record), it updates the displayName in
the config, which thus correctly updates the breadcrumbs. However,
this doesn't change the internal values in the ActionService, so if
another controller is stacked over the current one, the penultimate
entry is wrong. To update the internal state of the ActionService,
the event 'controller-title-updated' must be triggered as well,
which is cumbersome. Note that we don't really face the issue yet
because among already converted views, none of them need to update
its displayName in the breadcrumbs.
This commit aims at uniformizing the way the (n-1) first entries
and the last one behave, by making the "breadcrumbs" key encode
all breadcrumbs entries (the n-1 first ones, and the last, current
one). We also replace the "displayName" key by "getDisplayName"
such that it uses a single source of truth, located in the
ActionService, and we provide a function "setDisplayName" to update
it. Finally, this commit introduces the notion of "default config"
which ensures that standalone views, or views in tests, have a
valid config with expected keys.
closesodoo/odoo#81031
Related: odoo/enterprise#22799
Signed-off-by: Géry Debongnie <ged@odoo.com>
Let's suppose a legacy client action that can be opened from
another action, s.t. it is stacked on it. Before this commit,
the breadcrumbs was incorrect in that client action, as it only
displayed the part of the client action itself, but not the
history. This commit fixes the issue.
Part-of: odoo/odoo#81031
The name of the action is supposed to be displayed in the second
part of the window title (e.g. "Odoo - Partners"). Before this
commit, this wasn't the case for views that were converted to
wowl (only legacy views correctly updated the window title).
Part-of: odoo/odoo#81031
It's not allowed to delete order for french certification which was
supposed to be fixed here: 46ffe6d3fba3baf1d84af732feaac71dabaaf35f
However, it introduced another problem of not being able to delete
the finalized/validated orders. It's because the check of preventing
the deletion, we are not discriminating the validated order. This
commit fixes the issue by only applying the rule on orders that are
being explicitly deleted (reason of deletion is "abandon").
closesodoo/odoo#81289
Ticket-id: 2710892
X-original-commit: d477be7cd5f7820ea6925dcfb42a26e67977b052
Signed-off-by: Masereel Pierre <pim@odoo.com>
Before this commit, it would fetch all channels partners of all channels, even
for big channels and for members that were not useful to known anything about.
This commit reduces the number of fetched members to a more reasonable level,
and ensure the formatting of those members is done only once, instead of once
per channel.
Time goes from 90ms to 1ms for 1000s of members in 100s of channels.
Part of task-2702450
closesodoo/odoo#81262
X-original-commit: 89419b593ed163a8b174945e80f1c36c9cf78257
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Purpose
=======
When there are multiple databases on a single server, it is necessary
to be able to set the "from_filter" for the implicit SMTP server
on a per-database basis, to allow 'opt-in' to the automatic wrapping
of email notifications.
When set to e.g. `notifications@example.com`, and a default SMTP
server is defined in the server-wide config or CLI, outgoing emails
will be automatically rewritten to come from this email, unless the
From/Return-Path domains match the `mail.catchall.domain` parameter.
Task-2710632
closesodoo/odoo#81277
X-original-commit: 8b468e1f7a3dfeb2bcfa83bff55c4b5adf6b2212
Signed-off-by: Olivier Dony <odo@odoo.com>
It turns out that the 'no_edit' attribute of the fields is deprecated
and doesn't do anything (there is no JavaScript or Python code using it).
We will hence remove that attribute from the views to clean them.
task-2686290
closesodoo/odoo#81210
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Define "Default Terms & Condition" in settings
Create invoice
No default terms will show
opw-2701811
closesodoo/odoo#81160
X-original-commit: 323534c89963f466ac7c53894fed62691bd2321f
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Current behavior:
Invoices report had a wrong average price when invoice had credit note
Steps to reproduce:
Create a db with accounting
Create a customer C and a Product P
Create an Invoice for C for 10 pieces of P
Create a Credit note for C for 1 P
Go to Reporting > Invoice Analysis
Open the pivot view, in the Measures, display the Average Price, the Product quantity and the Untaxed Total
The Total multiplied by the quantity is not equals to the average.
opw-2557420
closesodoo/odoo#81238
X-original-commit: ef26467e288a12571c37d4c133b44f08d99cc702
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Was used at the beginin of the migration to github with commands such
as "git log --use-mailmap" but now, everybody use a proper email
address.
closesodoo/odoo#80431
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
In this commit (f3fe2d50d9),
the field 'name' is renamed into 'partner_id'. However,
this renaming was not applied properly in point_of_sale.
We fix this in the current commit.
closesodoo/odoo#81165
X-original-commit: c5ccccc24ca0a746c30bc2ffba1a7e48229925bb
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Avoid iterating over all channels every time a new channel is added.
Part of task-2702450
closesodoo/odoo#81264
X-original-commit: 7686be710ba919079f6ea97293ac99dde79f843b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When paying an expense, we should take the bank accounts from partner instead of the ones set on the company.
Also, the computation of the partner bank account is different on the wizard and the payment.
To unify both models, the 'available_partner_bank_ids' should also be put on account.payment.
see https://github.com/odoo/odoo/pull/79737closesodoo/odoo#81236
X-original-commit: 89d8c0a1ea03919e9f3085ea0d05aa80ad443ff7
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
- allow to match a partner having 'BE0477472701' as vat but '477472701' inside the xml.
- code cleanup as suggested in the original PR
Introduced by https://github.com/odoo/odoo/pull/80266closesodoo/odoo#81237
X-original-commit: 598bfedb540aa81676b957340255aafef85d2823
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
Avoid iterating over all channels every time a new channel is added.
Part of task-2702450
closesodoo/odoo#81235
X-original-commit: f5958f7ae15acff6a1ab6fc1bdf795b4c1f1e071
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>