Commit Graph
11 Commits
Author SHA1 Message Date
clesgow 57e31b7c82 [FIX] {purchase_,}mrp: convert costs when different currencies
Steps to reproduce:
- Enable a second currency (e.g. EUR)
- Create a product P with a supplier using EUR as currency
- Create a MO with this product P as component and confirm it
- Open the Overview

Issue:
In the MO Cost column, the cost will be displayed in the company
currency but without converting its value.

Task-3251506

Part-of: odoo/odoo#114536
2023-10-20 14:59:09 +00:00
clesgow e0d54b8d1e [IMP] mrp: change meaning of cost columns in MO Overview
Have the "MO Cost" column mean the expected costs following *this*
Manufacturing Order.
Rename "Product Cost" into "Real Cost" and have it represent what where
the actual registred costs for this MO.
This allows for a quick comparison against what was expected and what it
really cost.

Part of task-3251506

Part-of: odoo/odoo#114536
2023-10-20 14:59:09 +00:00
clesgow 9fb0409e6d [IMP] {purchase_,}mrp: Add done MTO links into the MO Overview
As the content of the replenishments in the MO Overview is computed
through the forecast report data, as soon as a product is in stock,
the line about it disappears, since it is no longer linked to a
reception (PO/MO) in the forecast report.

But for MTO strong links, it makes sense to keep trace of what was used
to manufacture the products. So we inject the data back as if it was
regular forecast lines.

Part of task-3251506

Part-of: odoo/odoo#114536
2023-10-20 14:59:09 +00:00
Djamel Touati d87c0919a1 [FIX] purchase_mrp: fix MO overview
Steps to reproduce the bug:
- Create a storable product “P1” with BoM:
   - Component C1:
        - Quantity: 2
        - supplier:
            - add any vendor, min quantity: 3
- Create a MO to produce 1 unit
- Click on the manufacture overview

Problem:
A user error is triggered:

`“The unit of measure Units defined on the order line doesn't belong
to the same category as the unit of measure False defined on the
product. Please correct the unit of measure defined on the order line
or on the product, they should belong to the same category.”`

The _compute_quantity function is called with supplier.product_uom even
though no supplier with the requested quantity is available.

opw-3495770

closes odoo/odoo#136340

X-original-commit: 17e5323e292a7b29ee6d30711cf3f083e05dd008
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-09-25 09:38:39 +00:00
yhu-odoo 0171f4a1e4 [FIX] {,purchase_}mrp: add missing days when calculate DTPMO
When calculate Days to Prepare Manufacturing Order, we didn't take into
account Days to Purchase and Security Lead times for Purchaseing of the
company. In this commmit, if the (sub-)bom has company_id set, these two
days will added to the calculation.

Task-3078049

X-original-commit: bf59aedad649dec350f091bb074d3ef1e51d5fcb
Part-of: odoo/odoo#121813
2023-05-19 16:42:07 +02:00
clesgow a145830b34 [FIX] {purchase_,}mrp: set costs for RFQ in MO Overview
While the cost of a line related to an RFQ was saved, it was not used in
the displayed costs.
Also, it used the wrong cost (don't need to factor in taxes), not did it
factor the quantity used in the cost.
Fixes as well the MO Cost for partially in-stock products.

Part of task-3217757

Part-of: odoo/odoo#118023
2023-04-13 15:26:41 +02:00
clesgow 3784b0882e [FIX] mrp: use the right receipt date for PO replenishments
Instead of always using the `date_planned` of the PO to compute the
estimated/expected receipt date of a purchase order in the MO Overview,
instead use the `scheduled_date` of the related picking when it's
possible (i.e. when the PO is confirmed).

Part of task-3217757

Part-of: odoo/odoo#118023
2023-04-13 15:26:41 +02:00
clesgow d4a70eab4d [FIX] {purchase_,}mrp: fix wrong uom for Overview replenishments
The MO Overview would display the wrong uom in the replenishments lines
of the MO Overview. Since the data was pulled from the forecast report
(which displays it in the product's uom), it could not coincide with the
ones used in the MO.

Part-of: odoo/odoo#118023
2023-04-13 15:26:39 +02:00
clesgow 6d26600f38 [FIX] purchase_mrp: fix MO overview override
The changes done to properly use the uom done in the `mrp` module were
not reflected in the `purchase_mrp` module, raising a traceback when the
purchase module was installed.

Part of task-3217757

Part-of: odoo/odoo#118023
2023-04-13 15:26:38 +02:00
clesgow 1ef03b92a0 [IMP] {purchase_,}mrp: Add MO Overview
Adds in a new report that allows the user to monitor the entire
production of a product, including the resupply of the components (i.e.
subassemblies, purchases, ...) in a single view.

Task-3059467

Part-of: odoo/odoo#113394
2023-03-03 18:10:57 +01:00
clesgow 42f1d31130 [IMP] purchase_mrp: Buy route for BoM overview
Add support for "buy" route recognition in the BoM overview report, as
well as calculating receipt delay for this kind of route

Task-2628323

Part-of: odoo/odoo#93194
2022-08-26 17:16:41 +02:00