Commit Graph
147686 Commits
Author SHA1 Message Date
rhe-odoo 298c23f048 [FIX] pos_cash_rounding: Fix value under rounding
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.

closes odoo/odoo#81392

X-original-commit: 523bc2f9b26bbb51ededcb734fa4ec384671575b
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-14 13:29:04 +00:00
Víctor Martínez 166d1cf687 [FIX] stock_landed_costs: Allow to use LC without real_time
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

closes odoo/odoo#81303

X-original-commit: 05af566f7cdbe36fa0a7e07da15b37bd1349ed80
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-14 13:29:00 +00:00
wan 1656f1a093 [FIX] account_edi: search partner based on VAT with spaces
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/bfb2436b9d99bf9eea29ee44000e18197efa88b6
https://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.

closes odoo/odoo#81263

X-original-commit: 04aa5cd79c6aca1615ba022c351054a390e6c0b5
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-12-14 13:28:56 +00:00
Arthur Gossuin (goa) 7fc9234316 [IMP] delivery: add product_template.country_of_origin field
The origin of goods is required for the commercial invoice generation with
delivery providers. Until then we were using the warehouse country, but the
origin of goods is a different kind of field, as explained in this link:
[https://ec.europa.eu/taxation_customs/customs-4/international-affairs/origin-goods_en]( https://ec.europa.eu/taxation_customs/customs-4/international-affairs/origin-goods_en)

This commit is part of more important upcoming changes brought in Odoo
enterprise, especially with Fedex, Easypost, DHL and UPS commercial
invoices.

task-2701428

closes odoo/odoo#80900

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-14 13:28:53 +00:00
Samuel Degueldre 57a02f0a14 [REF] web: remove dropdown-item-selected event
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.

closes odoo/odoo#80684

Related: odoo/enterprise#22722
Signed-off-by: Géry Debongnie <ged@odoo.com>
2021-12-14 12:40:19 +00:00
Samuel Degueldre 671ed63b2a [IMP] web: call methods with correct 'this' in arrow function
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
2021-12-14 12:40:19 +00:00
Louis Wicket (wil) 98290450c8 [IMP] mail: rename attachment card model
Rename javascript model `mail.attachment_card` to `AttachmentCard` in
order to distinguish javascript model from python model.

Part of task-2701674.

closes odoo/odoo#80604

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 12:40:09 +00:00
Fabio Barbero f1b1286393 [IMP] survey: display final screen in live presentation
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

closes odoo/odoo#80447

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-14 12:40:04 +00:00
Christophe Monniez c435e307df [IMP] test_lint: add a lint test for manifest keys
closes odoo/odoo#79977

Related: odoo/enterprise#22846
Related: odoo/upgrade#3078
Signed-off-by: Raphael Collet <rco@odoo.com>
2021-12-14 12:39:54 +00:00
Julien Castiaux 8b6f438b7b [FIX] *mail_plugin: unused i18n path in manifest
*: mail_plugin, crm_mail_plugin, project_mail_plugin

The code that is discovering translatable strings is defined in
[translate.py]. It does lookup in all python files and in all javascript
files defined under 'static/src/'.

The top-level `web.assets_backend` directive in the manifest is useless
and have been removed.

[translate.py]: https://github.com/odoo/odoo/blob/8b468e1f7a3dfeb2bcfa83bff55c4b5adf6b2212/odoo/tools/translate.py#L1138-L1147

Part-of: odoo/odoo#79977
2021-12-14 12:39:54 +00:00
Julien Castiaux 2e29a93503 [REF] core: remove http.addons_manifest
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
2021-12-14 12:39:54 +00:00
Victor Feyens 75012e62e9 [FIX] sale_stock: query count checks
It seems the query count is not deterministic on runbot

closes odoo/odoo#81374

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-12-14 11:49:46 +00:00
Louis Wicket (wil) eb39fbb702 [IMP] mail: rename media preview model
Rename javascript model `mail.media_preview` to `MediaPreview` in order
to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81373

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 11:49:42 +00:00
Younn Olivier b82cc9df55 [FIX] web_editor, website: fix inconsistent edit menu test
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

closes odoo/odoo#81351

X-original-commit: d35125cc0444679488fa1a020b6bd8a6c4409b6f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-14 10:55:11 +00:00
Younn Olivier 9f93fa8e77 [FIX] web_editor, website: fix menu edtion from the "edit menu" button
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
2021-12-14 10:55:10 +00:00
Younn OlivierandArthur Detroux d25033ff1c [FIX] web_editor, website: fix validation issue when saving LinkDialog
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>
2021-12-14 10:55:10 +00:00
Younn Olivier 40a06bfafa [FIX] web_editor: do not toggle link tools/popover for extra menu items
[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
2021-12-14 10:55:10 +00:00
Younn Olivier 1bbb7c920b [FIX] website: fix menu item edition from "edit link" button
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
2021-12-14 10:55:06 +00:00
Louis Wicket (wil) ba097f69e1 [IMP] mail: rename discuss public view model
Rename javascript model `mail.discuss_public_view` to `DiscussPublicView` inorder to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81346

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 10:54:56 +00:00
Louis Wicket (wil) ba6dd459be [IMP] mail: rename dialog manager model
Rename javascript model `mail.dialog_manager` to `DialogManager` in
order to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81334

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 10:54:52 +00:00
Louis Wicket (wil) 17bcfc3fda [IMP] mail: rename chat window manager model
Rename javascript model `mail.chat_window_manager` to `ChatWindowManager` in order to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81323

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-14 10:54:48 +00:00
xlu-odoo f5feb70ae4 [FIX] website: remove safari css workaround for configurator svgs
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

closes odoo/odoo#81190

X-original-commit: 6b17497f4e29394a704646b287f0d9c8c9839768
Related: odoo/design-themes#538
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-14 10:54:42 +00:00
John Laterre (jol) 477365a608 [FIX] l10n_nl_edi: fix traceback when posting an invoice
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#80740

closes odoo/odoo#81360

X-original-commit: 81209239d1ef38ad6c53dd7706d57fb9312bda82
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: John Laterre <jol@odoo.com>
2021-12-14 10:00:41 +00:00
Florian Charlier dda6e65e15 [FIX] crm: fix priority stars alignment
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

closes odoo/odoo#81358

X-original-commit: 61925f488557181ae691d222a142a242c939d3e0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-14 09:11:23 +00:00
Mitul Shah c7fd509f9c [IMP] web: improve tooltip for priority widget's star icons
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

closes odoo/odoo#80213

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-14 09:11:19 +00:00
Fabio Barbero a66cdf3f7f [IMP] link_tracker, http_routing: ignore requests from social bots for link tracker
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

closes odoo/odoo#78806

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-14 09:11:15 +00:00
Pierrick Brun 66ba1c3c4a [FIX] point_of_sale: translate confirmation message
The message displayed to the user was not translated

closes #81065

closes odoo/odoo#81246

X-original-commit: 9ce8f83f2a7a55a00f73d4522714151e2f8ffc44
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-14 06:19:45 +00:00
Benoit Sociasandqsm-odoo ba81b94e53 [FIX] website, website_blog: keep valid resize_class upon cover change
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

closes odoo/odoo#81349

X-original-commit: 4e5aa57913c4270d0e9de6e7318eb5d25daaddf4
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-13 21:02:39 +00:00
Victor Feyens d26b4687a7 [IMP] sale_stock: improve coverage of sale performance tests
closes odoo/odoo#81336

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-12-13 16:17:06 +00:00
Alvaro Fuentes c5ae057618 [FIX] base: in res.config.settings, field.related is a string
It used to be a tuple.
Cf: 1abe965b59

opw-2681777

closes odoo/odoo#81312

X-original-commit: aa74f51db7bf5a8ad1f4e309b6352df3c31037ec
Signed-off-by: Raphael Collet <rco@odoo.com>
2021-12-13 14:11:51 +00:00
Tommy (tong) 588cab25a1 [FIX] base_import_module: fix existing assets import error
closes odoo/odoo#81307

X-original-commit: 3f505c82a3c2de0c88e6e0ca2f02de0910df00c5
Signed-off-by: Raphael Collet <rco@odoo.com>
2021-12-13 13:18:02 +00:00
Mathieu Duckerts-Antoine ace9f6c2da [FIX] web: action group_by of type string
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.

closes odoo/odoo#81306

X-original-commit: ea209f126c57ea2f3e456a9b459dd46fd78fc33a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-12-13 13:17:58 +00:00
Mathieu Duckerts-Antoine c862c8097b [FIX] web: search view after url loaded
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
2021-12-13 13:17:58 +00:00
FrancoisGe a8222d65e6 [IMP] web: add tooltip on Dropdown
This commit adds the possibility to add a tooltip on a Dropdown.

closes odoo/odoo#81205

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-12-13 13:17:50 +00:00
Sébastien Theys 71076550de [IMP] mail: add systray item containers
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.

closes odoo/odoo#80482

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-13 13:17:46 +00:00
Aaron Bohy f3e71d01ee [REF] web: rework env.config
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.

closes odoo/odoo#81031

Related: odoo/enterprise#22799
Signed-off-by: Géry Debongnie <ged@odoo.com>
2021-12-13 12:24:50 +00:00
Aaron Bohy 2cdd30d61a [FIX] web: breadcrumbs of stacked, legacy client actions
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
2021-12-13 12:24:49 +00:00
Aaron Bohy 3fa70eed13 [FIX] web: correctly set window title in wowl views
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
2021-12-13 12:24:49 +00:00
Joseph Caburnay d5390deba9 [FIX] l10n_fr_pos_cert: should only prevent on explicit order deletion
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").

closes odoo/odoo#81289

Ticket-id: 2710892
X-original-commit: d477be7cd5f7820ea6925dcfb42a26e67977b052
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-13 11:32:57 +00:00
Sébastien Theys 8d3a421457 [FIX] mail: manually prefetch needed channel partner in channel info
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

closes odoo/odoo#81262

X-original-commit: 89419b593ed163a8b174945e80f1c36c9cf78257
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-13 10:40:43 +00:00
std-odoo 84a63205f8 [FIX] base: allow setting default from-filter per database
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

closes odoo/odoo#81277

X-original-commit: 8b468e1f7a3dfeb2bcfa83bff55c4b5adf6b2212
Signed-off-by: Olivier Dony <odo@odoo.com>
2021-12-13 09:49:12 +00:00
Julien Banken 0040a7b609 [REF] sms,mail: remove no_edit attribute from fields
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

closes odoo/odoo#81210

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-13 09:49:04 +00:00
Andrea Grazioso (agr-odoo) 93b6033a25 [FIX] l10n_gcc_invoice: correct narration definition
Define "Default Terms & Condition" in settings
Create invoice

No default terms will show

opw-2701811

closes odoo/odoo#81160

X-original-commit: 323534c89963f466ac7c53894fed62691bd2321f
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2021-12-13 08:57:47 +00:00
roen-odoo 017a572143 [FIX] account : Average price fix invoice report
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

closes odoo/odoo#81238

X-original-commit: ef26467e288a12571c37d4c133b44f08d99cc702
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2021-12-13 08:09:46 +00:00
Florent de Labarre 9136c564e6 [REM] core: remove unused file and prevent spam
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.

closes odoo/odoo#80431

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-13 07:22:58 +00:00
Eleftherios Kritsotakis 3e9926e78d [FIX] point_of_sale: name is not properly renamed into partner_id
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.

closes odoo/odoo#81165

X-original-commit: c5ccccc24ca0a746c30bc2ffba1a7e48229925bb
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2021-12-13 06:25:46 +00:00
Sébastien Theys 80232c52db [FIX] mail, im_livechat: improve performance of sidebar item counter
Avoid iterating over all channels every time a new channel is added.

Part of task-2702450

closes odoo/odoo#81264

X-original-commit: 7686be710ba919079f6ea97293ac99dde79f843b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-11 10:54:05 +00:00
Laurent Smet 26a5d7d299 [FIX] account: Fix available_partner_bank_ids in payment & register payment wizard
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/79737

closes odoo/odoo#81236

X-original-commit: 89d8c0a1ea03919e9f3085ea0d05aa80ad443ff7
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-10 16:24:45 +00:00
Laurent Smet ed75307baf [FIX] account_edi: Add missing 'extra_domain' + Fix tests l10n_be_edi
- 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/80266

closes odoo/odoo#81237

X-original-commit: 598bfedb540aa81676b957340255aafef85d2823
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-10 15:28:57 +00:00
Sébastien Theys e80af1ce11 [FIX] mail, im_livechat: improve performance of discuss sidebar item
Avoid iterating over all channels every time a new channel is added.

Part of task-2702450

closes odoo/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>
2021-12-10 14:33:43 +00:00