Nshimiyimana Séna 727fd4f208 [FIX] sale, purchase: fix invoicing interaction with “Invoicing Switch Threshold”
Steps to reproduce:
- Create a sale order with a product that's invoiced on delivered
  quantities.
- Set delivered quantity (partial delivery) and create an invoice based
  on the delivered quantity. Set the  "Invoice Date" to sometime in the
  past.
- Go to the settings and set  "Invoicing Switch Threshold" to any date
  in the future (so that the invoice you created has a date BEFORE the
  new threshold)
- The invoice will get the label "invoicing app legacy".
- Go back to the sales order and change the delivered quantity.
You should see that the invoiced quantity is automatically set to 0.
A similar behavior can be observed with purchase orders.

Why this is happening:
When a new “Invoicing Switch Threshold”  is set, all posted invoices
before the threshold are marked as `canceled`. In v15, changing the
delivered quantities  triggers the invoiced quantities to be
recalculated as well. However, computing invoiced quantities doesn't
take into account  invoices that are marked as `canceled`. This mean
that the newly computed invoiced quantities won't include invoices
posted before threshold.

opw-2896797

closes odoo/odoo#98909

X-original-commit: cc979734bd7ef3f2a94b411cb7b4f3e782b7ddab
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
2022-08-30 03:45:05 +02:00
2022-08-27 11:40:22 +02:00
…
…
2021-10-07 17:59:53 +00:00
2022-01-14 15:44:52 +00: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%