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][BC] base_delivery_carrier_label: remove _set_a_default_package #853

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions base_delivery_carrier_label/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,8 @@ def attach_shipping_label(self, label):
self.env["shipping.label"].with_context(**context_attachment).create(data)
)

def _set_a_default_package(self):
"""Pickings using this module must have a package
If not this method put it one silently
"""
for picking in self:
move_lines = picking.move_line_ids.filtered(
lambda s: not s.result_package_id
)
if move_lines:
picking._put_in_pack(move_lines)

def send_to_shipper(self):
self.ensure_one()
if self.env.context.get("set_default_package", True):
self._set_a_default_package()
# We consider that label has already been generated in case we have a
# carrier tracking ref, this way we may print the labels before shipping
# and not generated in second time during shipment
Expand Down
1 change: 1 addition & 0 deletions base_delivery_carrier_label/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
* Dave Lasley <[email protected]>
* Timothée Ringeard <[email protected]>
* Pimolnat Suntian <[email protected]>
* Raphaël Reverdy <[email protected]>
Loading