The parent commit allows to select a specific interval for any
date or datetime field in the groupby menu. This makes some filter
akward, for instance "Order Month".
Accordingly, we have rewritten the string and help attributes in
search views archs and removed groupbys related to the same field
(that would have become redundant).
New test :
- Create a MO with a finish product tracked by SN with a dozen as
quantity
- Click on produce button in order to open the produce produce wizard
The quantity to do is 1 dozen although the tracking is by serial number
Task #55494.
This commit makes several improvement in the 'Produce' wizard on Manufacturing Orders
such as :
1) In produce wizard, all components will be visible. (Regardless of tracking)
2) Quantity done will be equal to expected consumption.
3) Produce wizard line data filled from an onchange on final product
4) Reserved column is added to 'produce' wizard
5) When production order is done, we hide the column 'reserved'
6) In produce wizard, if consuming products are not available or in too small quantity,
the lines is displayed red
Task #55494.
Refactor resource calendar and resource mixin:
- add a required timezone field on models 'resource.calendar' and 'resource.resource';
- resource calendar attendances are now computed in the timezone of the resource
or the calendar;
- improve API of 'resource.calendar' and 'resource.mixin';
- avoid other modules from using the implementation methods of 'resource.calendar';
- refactor implementation of 'resource.calendar' to make it more efficient.
Purpose is to limit the uninstallation of modules without being clearly
notified of it. In MRP ticking repair / maintenance install and uninstall
modules like stock, sale_management, mrp_workorder, ...
We therefore decided to remove those options from settings to prevent
users from uninstalling it.
This commit is related to task ID 1841221.
When seeing the work orders view, it would display an empty black box instead of
the proper message.
The message is not displaed since creation is deactivated.
opw 1839001
- Create the following BOM structure:
```
Prod 1 (Manufacture)
|
--- Prod 2
Prod 3 (Kit)
|
--- Prod 4
Prod 5
```
- The BOMs for Prod 1 & 3 must have a routing set, to generate
workorders
- Create a MO for 1 unit of Prod 1, process to the end
2 units of Prod 1 are created instead of 1.
This is due to the WO for Prod 3 not having a `next_work_order_id`.
Therefore, `record_production` adds an extra quantity at:
```
production_move.quantity_done += self.qty_producing
```
To prevent this, we set as `next_work_order_id` of the BOM of Prod 3 the
WO of Prod 1.
Closes#19527
opw-1817398
- Create a Finished Product tracked by SN
- Add a BoM with routing (in several steps) to that product: component A
should be consumed in 1st step and component B in 2nd step
- Create a MO, plan it, go on the first WO and produce the finished
product with SN 0001
- Then go on the second WO and produce the finished product with SN 0002
- Back on your MO, you'll see that
Finished Product = SN 0002
Component A has been consumed for SN 0001
Component B has been consumed for SN 0002
- Mark the MO as done
No blocking error is raised so I'm consuming a product for a finished
product I'm not really producing. Traceability report will be wrong too.
We raise a blocking error to avoid this use case.
opw-1832098
Co-authored-by: Nicolas Martinelli <nim@odoo.com>
We recently hid the Variants menu items in debug mode. We want to revert
this because the users need to see that menu for business operations.
eg : Check the inventory per variant
This partially reverts commit 62900064c0
Related to task #1839980Closes#24553
* [FIX] mrp: negative workorder issues
- In the onchange of the qty_producing in the wo,
we need to add the date to the stock.move.line as
it is a required field.
- When starting a workorder, check first if it has
not already been done.
At the creation of a manufacturing order, the default values for product_qty
and uom is respectively 1 and the product's one. We now use the the values
given by the bom
The field quantity_done_store had the same label as the field product_uom_qty
on model "stock.move" and there were confusions in the pivot view of
"stock.move".
opw:1841097
Use case to reproduce:
- Create a BOM with a byproduct tracked and a routing
- Mark the last workorder as done
- by products move line are not created
With the wizard produce (MO without routing) move lines
are created. Thus there is an inconsistency.
It happpens because workorders and produce button do not use
the same function. commit 1a09bcc622
already fix it for production wizard however it forgets workorders
process.
opw-1838707
The precision digit on the produce lines is not set to the product unit
of measure one. That can lead to a lost of precision when a small values
are set in the manufacturing order and not in the produce wizard.
OPW-1838077
When moves of a MO are generated, they are rounded up to the decimal
precision of the rounding, what is not done in the wizard.
So to keep it consistent, we also round up the quantity to consume in
the wizard.
Do not try to keep the reservation when creating a backorder for two
reasons:
1) it doesn't make sense since the backordered move will only be
confirmed while it got some reserved move lines
2) with badly configured uom's rounding, it is possible that the
initial demand of the backorder is inferior to the now reserved
quantity
We also fix another "cannot unreserve more than available" cause that
could happen in the second case ; let's imagine in the second case that
the backordered quantity is 0.999, `_update_reserved_qty` will reserve
0.999 on the quants but do not create a move line as range (0, 0.999)
will not return anything.
We remove `test_split_1` as it tested a behavior we removed and add a
new test showing a new flow with what we fixed.
Please note that setting the rounding of unit to 1.0 would have
prevented all the issues here.