When routes are defined for the variants of a product, the total number
of routes is not computed correctly. The total number of routes for a
product template should be the sum of the routes of its variants.
opw-657471
Add a related field to the partner_id of the picking. Note that
partner_id on stock.move is different from partner_id on stock.picking
in case of dropshipping, therefore we need to show both fields.
opw-656298
When the user validates a picking without going through the manual
reservation process, Odoo tries to assign the picking then performs the
transfer. However, if the picking could not be assigned, no pack
operation is created and the picking will simply be set to done.
The fix raises an error if the picking could not be assigned completely.
Another solution is to use a force_assign instead of action_assign, but
that could lead to the creation of negative stock moves without warning
the user. We therefore prefer to stay on the safe side and force the
user to manually handle the reservation.
Note: the original issue was that the Owner of the picking was not
copied on the quant when validating right away. The reason was that no
pack operation was created.
opw-654423
`stock.move` & `stock.product` have multi-company rules.
There is therefore no reason why `stock.quant` could not have one.
Besides, this could lead to access rights issues,
when a user went to the `Quants` list,
in Warehouse > Traceability > Quants,
while there were quants for products in a company different
than the user company.
opw-653188
`partner_id` is not the `supplier` of the stock move,
this is the destination address:
`Optional address where goods are to be delivered,
specifically used for allotment`.
The supplier would be a related to the `partner_id`
of the `picking_id`.
Nevertheless, displaying the `supplier` in the `stock.move` list
is not useful. You should use the pickign list for that matter.
opw-656985
Closes#9219
When all the products need to be reserved before doing the picking,
the pack operations were not shown, but still created.
This is not necessary (and did not work as it tried to reserve according to
existing pack operations), as you will need to reserve again when there is
sufficient stock to put the picking in available state and then
the pack operations will be generated and made visible.
`Recheck availability` must ignore
the done or cancelled moves.
Otherwise, it raises the warning telling you cannot
unreserve a done move.
https://github.com/odoo/odoo/blob/856b31719c69e7f022143ce39df7c6c43688beb9/addons/stock/stock.py#L1899
To reproduce the issue:
- Create a delivery order,
with 10 stockable product A
& 10 stockable product B,
mark as todo.
- Create a receipt,
with 5 stockable product A,
mark as todo & transfer.
- Cancel the move of stockable product B from the delivery order,
in Traceability -> Stock Moves.
- Come back to the delivery order, `check availability`,
then, `recheck availability`
Closes#9550
When moving lots, we should also take into account the information on the
pack operation: specific location, package to take it from and owner.
Also, in the get_preferred_domain for the pack operations, when not giving any pack,
we should check the quant is not in a pack. It is also better to copy the list
to avoid that the constraints added to the list would get into the next call.
Make sure to unreserve all quants before assignment. Indeed, the method
makes this assumption and does not take into account any existing
reserved quants. Therefore, without this fix, there is a possibility to
reserve more than needed.
opw-653904
Stock user should be able to create products. Indeed when targetting small
businesses, restricting the right to create products limitates the use of
the inventory app. It is possible to further restrict access to the product
model using record rules for big companies that have a lot of users and
managers, and where creating product should be limited.
Including :
- sales and purchaes flows did not match the actual sales and purchase
applications due to last changes in v9. Those have been udpated.
- typos, wording, use of tense
- links: from 8.0 to 9.0, internal links
- and more stuff
Update pot file for stock is included in this commit, as this is a stable version.
Set no_recompute to True
in order to speed up barcode picking UI
This is done for the same reason than
7b306fc17a
merged through #6754.
The remaining quantities will be computed in the
`do_transfer` method, thanks to the call
`picking_recompute_remaining_quantities`.
There is therefore no need to recompute
the remaining quantities for each pack operation.
Closes#9142
opw-645883
In a multi-company environment, you might not
have the access to the stock location
`stock.stock_location_stock`,
in such a case, you should not set it as default value.
This is a regression of revision 9bf6f0310e
opw-652387
When delivering partially a picking in which the moves
had an owner (`restrict_partner_id`) set,
the owner were not kept in the backorder moves.
Closes#4693