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

[IMP] shopflor/mobile/_packing: Allows to select package types for packing #25

Draft
wants to merge 4 commits into
base: 16.0-shopfloor_packing-sbj
Choose a base branch
from

Conversation

rousseldenis
Copy link
Member

@rousseldenis rousseldenis commented Sep 19, 2024

@rousseldenis rousseldenis force-pushed the 16.0-imp-packing-dro branch 3 times, most recently from fc10d87 to 8f5146b Compare October 29, 2024 13:20
Comment on lines +11 to +13
class PackagingAction(Component):

_inherit = "shopfloor.packaging.action"
Copy link

Choose a reason for hiding this comment

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

Just to not confuse with product packaging

Suggested change
class PackagingAction(Component):
_inherit = "shopfloor.packaging.action"
class PackAction(Component):
_inherit = "shopfloor.pack.action"

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.

Some renaming (I haven't listed them all)

_inherit = "shopfloor.cluster.picking"

def _get_available_delivery_packaging(self, picking):
Copy link

Choose a reason for hiding this comment

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

Suggested change
def _get_available_delivery_packaging(self, picking):
def _get_available_delivery_package_types(self, picking):

Comment on lines +35 to +41
def list_delivery_packaging(self, picking_batch_id, picking_id, selected_line_ids):
"""List available delivery packaging for given picking.

Transitions:
* select_delivery_packaging: list available delivery packaging, the
user has to choose one to create the new package
* select_package: when no delivery packaging is available
Copy link

Choose a reason for hiding this comment

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

Suggested change
def list_delivery_packaging(self, picking_batch_id, picking_id, selected_line_ids):
"""List available delivery packaging for given picking.
Transitions:
* select_delivery_packaging: list available delivery packaging, the
user has to choose one to create the new package
* select_package: when no delivery packaging is available
def list_delivery_package_types(self, picking_batch_id, picking_id, selected_line_ids):
"""List available delivery package types for given picking.
Transitions:
* select_delivery_package_type: list available delivery package types, the
user has to choose one to create the new package
* select_package: when no delivery package types are available

Comment on lines +48 to +49
delivery_packaging = self._get_available_delivery_packaging(picking)
if not delivery_packaging:
Copy link

Choose a reason for hiding this comment

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

Suggested change
delivery_packaging = self._get_available_delivery_packaging(picking)
if not delivery_packaging:
delivery_package_types = self._get_available_delivery_package_types(picking)
if not delivery_package_types:

response = self._check_allowed_qty_done(picking, selected_lines)
if response:
return response
return self._response_for_select_delivery_packaging(picking, delivery_packaging)
Copy link

Choose a reason for hiding this comment

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

Is there a _select somewhere ?

Suggested change
return self._response_for_select_delivery_packaging(picking, delivery_packaging)
return self._response_for_select_delivery_package_type(picking, delivery_package_type)

When a lot is scanned, it does the same as for the products but based
on the lot.

When a packaging type (one without related product) is scanned, a new
Copy link

Choose a reason for hiding this comment

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

model changed from v14, not related to product anymore

Suggested change
When a packaging type (one without related product) is scanned, a new
When a package type is scanned, a new

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.

2 participants