- Create 2 companies A & B
- Create a product P with 2 phantom BOMs:
Component C1 for company A, with sequence = 10
Component C2 for company B, with sequence = 0
- Create a SO in company A for P, validate
The picking contains C2, while one would expect C1 since C2 is only for
company B.
opw-807640
We added a constraint in [1] to improve the usability of introducing
tracked move lines in the system. However, this contraint proved to be
too costly (trigger multiple time during the validation process, never
called in batch as it is set on the model at the end of a o2m).
We replaces the constraint by checks on the validating process or by
(non-blocking) onchanges.
With these changes, validating the receipt of 3000 tracked move lines
goes from 17 minutes to around 4.
[1] 482407464a
opw-803887
Since commit 55c0221e38 it is
not possible to unbuild what has not been build by ourself.
However we won't block the customer and let him unbuild everythings.
When the user unbuild a product with a MO specified
the system will generate the inverse moves from the BOM.
However the BOM could have change.
This commit instead use the MO specified in order to
generate the inverse moves.
Add decimal precision to quantitites in stock.production.lots.
Otherwise, if the UoM uses a DP larger than 2, inconsistencies may arise
since the field is automatically rounded to 2 decimals in the interface.
For example, if the DP of the UoM is 4:
- Set Qty Done to 1.234567
- Save => qty recorded in DB is 1.234567
- Edit, change nothing and save => qty recorded in DB is 1.23
This happens since the web client parses the value in the DOM and
detects a value change.
opw-788078
Steps to reproduce the bug:
- Create a routing with a Product Location of type view
- Create a MO with this routing
- Click on "Plan" without clicking on "Check for Availability"
- Complete the work orders
- Go back to the MO and try to put it in state "Done"
Bug:
Impossible to set the MO on state "Done". By clicking on "Mark as Done",
it returns:
You cannot take products from or deliver products to a location of type "view"
opw:803580
- Define a Component A tracked by lot.
- Define a Final Product B tracked by lot.
- Create a BOM, e.g. 5 units of A to produce B.
- Get some quantity of A in a sub-location, e.g. 'WH/Stock/Shelf 1'.
- Create a MO for 1 unit of B.
- When clicking on 'Produce', record 6 units consumed instead of 5.
- Post the inventory
5 units of A is removed from 'WH/Stock/Shelf 1' and 1 unit of A is
removed from 'WH/Stock'. The latter might create a negative quant if no
stock is available in 'WH/Stock'.
When the extra move line is created, it is created using the data of the
stock move (in `_generate_consumed_move_line`). When posting the
inventory, the quants selection is made strictly in the location set (in
`_update_available_quantity`), which might cause the mentioned negative
quant.
The solution is to select a sub-location where the product can be found.
This gives a higher chance to avoid negative quants afterwards. Note
that if we wanted to avoid negative quants, we could make a reservation
process on the move, and potentially create several stock move lines.
This is beyond the scope of the integration of MRP with sub-locations.
opw-803969
Before this commit, the special mrp validate_move method did a call to
quants_move with an incomplete signature. IN the use case, that we want
to make "own" produced quantities by a third party (maquila), we can do so in
downstream modules by restrict the partner on the move so that any moved (or
created) quants will belong to this partner (owner). This is certainly
important for the case where finished products are not your own
property. Courtesy of blaggacao.
Closes#21072
When copying a done MO that is unlocked, the new MO is also unlocked and
the buttons to produce/check availability aren't displayed and it is
confusing to the user.
Fixes#20119
Optional bom line havea default `product_qty` of 0. As the "check
availability" button is displayed if the MO is not available and
the `_compute_availability` method considers all move of 0 `product_qty`
as unassiged, the "check availability" button was always displayed and
it was confusing.
Do not consider move with a 0 product_qty in the `_compute_availability`
method to fix the display of the button.
- Activate Work Orders
- Go in MRP > Reporting > Work Orders
The status filters ('Ready', 'Pending'...) do not work.
This is because the action forces the domain to `[('state','=','done')]`
instead of using one of the available filters.
opw-788043
The regional variations are not published on Transifex and hsould be translated
manually.
The translations are mainly from previous versions or contains buggy fuzzy
translations (not matching the real source string).
Clean based on the .pot and delete the empty files
Fixes#21733
- Create a MO which generates WOs
- User 1 starts working on it
- User 2 starts working on it
The field 'Real Duration' only displays the time spent by the user
connected. It means that there will be an inconsistency between the
field 'Real Duration' and the list of durations shown in the `time_ids`
field.
We want to keep 'Real Duration' limited to the current user, because it
should represent the duration updated in real time (done in widget
`mrp_time_counter`). However, we also want to see the total real
drations for all users. Thereofe, we simply update the view to show the
total in the list view.
opw-784456
Usecase to reproduce:
- Set a product with the same lot in different locations
- Create a MO that will uses theses products and that require more than one location
- Produce it.
-> Traceback Expected singleton: stock.move.line
It happens because product produce only expect one move line
by lot. Howeever it could exist more than one move line if the
product for a specific lot are shared among multiple under location.
This commit try to fill the move line with the correct quantity
one by one and add the extra in a new move line.
Use case to reproduce:
- Create a MO with a product tracked and a qty to produce greater than 1.
- The Bom should also use a routing with at least 2 operations.
- On the first workorder only produce 1 unit and record the production
- Go to the next workorder -> The final lot is not set.
It happens because the lot for the next workorder is only set if the
total quanity for the mo was produced.
This commit fixes the bug by removing the code for the workorder lot
assignation outside the wrong condition. This commit also update the
test test_00b_workorder_process that allows us to find the above bug.