David (dafr) 7ae5c26526 [FIX] mrp: use date_start for confirmed mo in _run_manufacture
For Confirmed MOs, the date that should be used is the `date_start`, not the `date_deadline`:
    - Confirmed MOs have StockMoves with `move.date == mo.date_start`
    - When computing the qty_to_order, the move.date will be used
    - When finding existing MO to add quantity
        If `mo.date_deadline != mo.date_start`
        Then we can end up in a situation where a Confirm MO is too late to take its quantity into account, but not too late to add the qty_to_order to it.
        Then everytime you run the scheduler, this MO will be too late, so new quantity must be ordered, and the quantity will be added on this MO which is too late.

## TO REPRODUCE ##
- Create product P_M
- Create BoM
- Create Reordering Rule:
    trigger: auto | min: 10 | max: 20 | route: manufacture
- Create & Confirm SO for 10 unit of P_M
=> new confirmed MO for P_M should have been created
- Update MO scheduled date to 2 days in the future
- Run Scheduler
=> New quantity added, you can run the scheduler as many times as you want, new quantity will always be added

OPW-3524854

closes odoo/odoo#142256

X-original-commit: 531fa573a3bb40bd3b82c2a21db5e82d51a2800a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: David Fesquet (dafr) <dafr@odoo.com>
2023-11-16 08:57:51 +00:00
2023-10-27 08:36:16 +00:00
2023-11-02 21:02:44 +00:00
2023-11-12 07:49:06 +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%