Matheus Leal Viana (malv) ebdb317a98 [FIX] account: Create multiple invoices with correct account
Steps to reproduce:
-------------------
* Go to Contacts and create two contacts, each with a personalized account receivable;
* Go to Sales and create a quotation for each contact;
* Confirm the quotations and deliver the products;
* From the sale.order view list, select the two SOs and click on Action to create invoices.
* Go to the new invoices -> Journal items
* One of the invoices has wrong account receivable

Issue:
-------------------
When creating two invoices for two different quotations and customers, where each customer has a personalized account receivable, only one of the new invoices assign it correctly.

Cause:
-------------------
When computing the account_id for the move lines, a SQL query selects distinct based on
property.company_id, property.name but since the property.name is the same for both customers “property_account_receivable_id” and they have the same company_id it only consider the first one and the second is discarded.

To fix the issue, we need to ensure that all users are being considered in the computations.

OPW-3376865

closes odoo/odoo#129607

X-original-commit: c66d9ee2a160c3bad745b1394308c3e48f5f2e91
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Matheus Leal Viana (malv) <malv@odoo.com>
2023-07-25 21:22:51 +02:00
2023-07-25 21:22:49 +02:00
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%