Matheus Leal Viana (malv) 1e842901a0 [FIX] purchase_requisition_stock: calculate on-time rate when percentage is zero
Versions:
---------
- 16.0

Steps to reproduce:
-------------------
- Create a new Purchase Order.
- Set the Vendor to a brand new contact.
- Add a product that would be delivered.
- Confirm the PO, set the Expected delivery date in the past.
- Notice that on_time_rate and on_time_rate_perc are both -1.
- Process the delivery.
- Now on_time_rate is 0 but on_time_rate_perc is -1 still!

Issue:
------
The field OTD is -1 even when On-time delivery is 0

Cause:
------
The issue is happening because if po.on_time_rate == 0 the value
Is set to -1.

Solution:
---------
Modify the condition to ‘po.on_time_rate >= 0’ to handle this case

OPW-3413668

closes odoo/odoo#128584

X-original-commit: 4e3bf2242808435fd13be323af535cc6cc816da3
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Matheus Leal Viana (malv) <malv@odoo.com>
2023-07-17 18:13:30 +02:00
2023-07-12 11:19:58 +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%