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

[16.0][ADD] stock_release_channel_shipment_advice #560

Closed

Conversation

sbejaoui
Copy link
Contributor

@sbejaoui sbejaoui commented Feb 7, 2023

This module is used to plan the shipment advices for released pickings in a stock release channel.
As this is the base module, it only provides a simple planning mode. All the ready pickings of a release channel are grouped together to result in a single shipping advice per warehouse.

Depends on :

@sbejaoui
Copy link
Contributor Author

sbejaoui commented Feb 7, 2023

cc/ @lmignon

@sbejaoui sbejaoui force-pushed the 16.0-stock_release_channel_shipment_advice-sbj branch 3 times, most recently from 9aa2dc2 to 345a177 Compare February 7, 2023 14:55
@sbejaoui sbejaoui force-pushed the 16.0-stock_release_channel_shipment_advice-sbj branch 4 times, most recently from 59f1fc9 to b6362ab Compare February 8, 2023 11:33
@sbejaoui sbejaoui requested a review from lmignon February 8, 2023 12:27
Copy link
Sponsor Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

@sbejaoui The warehouse_id is not required on the release_channel but on the shipment_advice....
image

When you plan the shipments, you should group the picking by warehouse and makes a shipment advice by warehouse.

@sbejaoui sbejaoui force-pushed the 16.0-stock_release_channel_shipment_advice-sbj branch from b6362ab to 3ce9cef Compare February 9, 2023 14:02
@sbejaoui sbejaoui requested a review from lmignon February 9, 2023 14:04
@sbejaoui sbejaoui force-pushed the 16.0-stock_release_channel_shipment_advice-sbj branch from 3ce9cef to bb53810 Compare February 9, 2023 14:06
@sbejaoui sbejaoui force-pushed the 16.0-stock_release_channel_shipment_advice-sbj branch from ace622c to e5e45b6 Compare February 9, 2023 17:28
@sbejaoui sbejaoui requested a review from lmignon February 9, 2023 17:29
Copy link
Sponsor Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

nitpicking ....

@sbejaoui sbejaoui force-pushed the 16.0-stock_release_channel_shipment_advice-sbj branch 4 times, most recently from 9da01bc to bcb6b3a Compare February 12, 2023 18:21
@sbejaoui sbejaoui force-pushed the 16.0-stock_release_channel_shipment_advice-sbj branch from bcb6b3a to 9952fdc Compare February 13, 2023 10:07
@sbejaoui sbejaoui force-pushed the 16.0-stock_release_channel_shipment_advice-sbj branch from 9952fdc to e0f8a70 Compare February 13, 2023 14:40
Comment on lines 4 to 5
As this is the base module, it provides only a simple
planning mode. All released pickings are grouped together in a single advice.
Copy link
Contributor

Choose a reason for hiding this comment

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

Reading this, it is like all pickings inserted in the release channel are automatically planned in a shipment but I don't think so looking at the code.
Can you clarify how the shipment advice is supposed to be created in this simple mode and how the pickings are put in it?

Copy link
Contributor Author

@sbejaoui sbejaoui Feb 18, 2023

Choose a reason for hiding this comment

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

I updated the description, please check my last commit and let me know

@sbejaoui sbejaoui force-pushed the 16.0-stock_release_channel_shipment_advice-sbj branch from f7a3523 to 4d466a3 Compare February 22, 2023 10:03
@sbejaoui sbejaoui force-pushed the 16.0-stock_release_channel_shipment_advice-sbj branch 2 times, most recently from e8f5980 to 8aae49d Compare June 19, 2023 08:15
sbejaoui and others added 9 commits June 19, 2023 10:16
This module is used to plan the  shipment advice for released pickings in a
stock release channel.

As this is the base module, it provides only a simple
planning mode. All released pickings are grouped together in a single advice.

fix label

Co-authored-by: Laurent Mignon (ACSONE) <laurent.mignon@acsone.eu>

[FIX] - button_show_shipment_advice: improve domain

Co-authored-by: Laurent Mignon (ACSONE) <laurent.mignon@acsone.eu>

[IMP] - _compute_can_plan_shipment: improve expression

Co-authored-by: Laurent Mignon (ACSONE) <laurent.mignon@acsone.eu>

[IMP] - _plan_shipment: improve expression

Co-authored-by: Laurent Mignon (ACSONE) <laurent.mignon@acsone.eu>

Apply suggestions from code review

Co-authored-by: Laurent Mignon (ACSONE) <laurent.mignon@acsone.eu>
…annel

dock and warehouse are propgated from the release channel to shipment advice planner
…he warehouse

add data validation + form behavior improvement
self in compute is composed of objects browse(NewId), setting the computed field
with the db id leads to odoo raises and error saying newId didn't get a value
@sbejaoui sbejaoui force-pushed the 16.0-stock_release_channel_shipment_advice-sbj branch from 8aae49d to 83c33c8 Compare June 19, 2023 08:16
attrs="{'invisible': [('can_plan_shipment', '=', False)]}"
/>
</xpath>
<xpath expr="//field[@name='warehouse_id']" position="after">
Copy link
Contributor

@jbaudoux jbaudoux Aug 18, 2023

Choose a reason for hiding this comment

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

The Shipment Planning Method must be in the option tab, not in the selection criteria

Suggested change
<xpath expr="//field[@name='warehouse_id']" position="after">
<xpath expr="//group[@name='options']" position="inside">

Copy link
Contributor

Choose a reason for hiding this comment

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

As commented below, as this is not the only field, maybe put that inside a new tab instead of putting it in options

@@ -91,7 +91,6 @@ def _constrains_picking_type_location(self):
not record.location_dest_id
or not record.location_dest_id.is_sublocation_of(base_location)
):

Copy link
Contributor

Choose a reason for hiding this comment

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

Should not be part of this PR

Comment on lines +36 to +41
<xpath expr="//field[@name='warehouse_id']" position="after">
<field
name="dock_id"
attrs="{'invisible': [('warehouse_id', '=', False)]}"
/>
</xpath>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same for this. It should not be in the "Selection criteria" tab.

Maybe a new "shipment" tab would be suitable for the planning method and dock?

@simahawk simahawk changed the title [16.0][ADD] - stock_release_channel_shipment_advice [16.0][ADD] stock_release_channel_shipment_advice Oct 6, 2023
@simahawk
Copy link
Contributor

simahawk commented Oct 6, 2023

I'm checking the build here

@simahawk
Copy link
Contributor

simahawk commented Oct 6, 2023

Moving fwd here #761

@simahawk simahawk closed this Oct 6, 2023
@lmignon lmignon deleted the 16.0-stock_release_channel_shipment_advice-sbj branch February 21, 2024 16:18
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.

None yet

6 participants