Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX] shipment_advice: do not copy shipment advice id on moves #123

Open
wants to merge 2 commits into
base: 14.0
Choose a base branch
from

Conversation

TDu
Copy link
Member

@TDu TDu commented Apr 23, 2024

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.

Copy link

@mt-software-de mt-software-de left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

Should it also be copy=False on stock.move.line?

@TDu
Copy link
Member Author

TDu commented May 7, 2024

Thank you.

Should it also be copy=False on stock.move.line?

I do not think it is necessary, at least for what we are trying to fix here, which is handling backorder correctly.

@mt-software-de
Copy link

I my opinion this should also be False for stock.move.line, it should be set by

def _load_in_shipment(self, shipment_advice):
and not from a copy.

Copy link

@mt-software-de mt-software-de left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@simahawk simahawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

shipment_advice/tests/test_shipment_advice.py Outdated Show resolved Hide resolved
@OCA-git-bot
Copy link
Contributor

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). 🤖

@TDu TDu force-pushed the 14-shipment-advice-fix-backorder-move branch from d2e8bf4 to fd17878 Compare May 14, 2024 10:02
@mt-software-de
Copy link

@jbaudoux could you merge this one please?

@mt-software-de
Copy link

@jbaudoux could you merge this one please?

ping @OCA/logistics-maintainers ?

Copy link

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when you process with shopfloor reception and the move is split when you set destination ? Does it remains planned?

@mt-software-de
Copy link

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.

Copy link

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shopfloor_reception_shipment_advice needs to be adapted accordingly

@mt-software-de
Copy link

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?

TDu added 2 commits July 12, 2024 08:45
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.
@TDu TDu force-pushed the 14-shipment-advice-fix-backorder-move branch from 46152a5 to 5a708af Compare July 12, 2024 06:47
@TDu
Copy link
Member Author

TDu commented Jul 12, 2024

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...

@mt-software-de
Copy link

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.

@jbaudoux
Copy link

cc @rousseldenis (fyi)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants