Open TDu opened 5 months ago
Thank you.
Should it also be
copy=False
onstock.move.line
?
I do not think it is necessary, at least for what we are trying to fix here, which is handling backorder correctly.
I my opinion this should also be False for stock.move.line, it should be set by https://github.com/OCA/stock-logistics-transport/blob/487d71cce434bf0e817909f0208b64ec42de6c4d/shipment_advice/models/stock_move_line.py#L40 and not from a copy.
This PR has the approved
label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
@jbaudoux could you merge this one please?
@jbaudoux could you merge this one please?
ping @OCA/logistics-maintainers ?
What happens when you process with shopfloor and the move is split when you set destination ? Does it remains planned?
For shopfloor_delivery_shipment https://github.com/OCA/wms/blob/14.0/shopfloor_delivery_shipment/services/delivery_shipment.py we should be good.
For shopfloor_reception / shopfloor_reception_shipment_advice this could lead to an error, so i wouldn't remain planned.
I think therefor we should extend _prepare_move_split_vals
this would be used in https://github.com/OCA/wms/blob/7bca8fc3bf20d78a161010959c39edaca7c9bb8e/shopfloor_reception/services/reception.py#L1306 which is called by _split
Also there is done_action
https://github.com/OCA/wms/blob/7bca8fc3bf20d78a161010959c39edaca7c9bb8e/shopfloor_reception/services/reception.py#L963 which validates the transfer.
shopfloor_reception_shipment_advice needs to be adapted accordingly
I think we can overwrite _prepare_move_split_vals
within this PR and set shipment advice id, if a specific context key is set.
This context key can then be set in shopfloor_reception_shipment_advice
https://github.com/OCA/wms/blob/7bca8fc3bf20d78a161010959c39edaca7c9bb8e/shopfloor_reception/services/reception.py#L963 and https://github.com/OCA/wms/blob/7bca8fc3bf20d78a161010959c39edaca7c9bb8e/shopfloor_reception/services/reception.py#L1282
@TDu when do you plan to do this?
Rebased.
I have added a context key in _prepare_move_split_vals
I am working on the change in shopfloor_reception_shipment_advice
but struggling with the tests there...
I just discussed this topic, again. And right now i don't know where this requirement is coming from anymore. From my point of view i don't see any reason why the link shouldn't be copied within the reception scenario. We will schedule a meeting for this next week.
cc @rousseldenis (fyi)
In the case of partially receiving goods, the backorder moves created should not be included in the shipment advice being processed. But it probably makes sense for outgoing move as well.