Skip to content

Commit

Permalink
[FIX] delivery_package_number: download label
Browse files Browse the repository at this point in the history
If we don't return the print action the label won't be downloaded.

TT48759
  • Loading branch information
chienandalu authored and pablo-cort-s73 committed Nov 27, 2024
1 parent 3070a38 commit 83ebd80
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ def process(self):
if self.number_of_packages:
self.pick_ids.write({"number_of_packages": self.number_of_packages})
# put context key for avoiding `base_delivery_carrier_label` auto-packaging feature
res = self.pick_ids.with_context(
self.pick_ids.with_context(
set_default_package=False, bypass_set_number_of_packages=True
).button_validate()
if self.print_package_label:
self._print_package_label()
return res
return self._print_package_label()

def _print_package_label(self):
"""Method to be inherited by other modules and allow print the report in
Expand Down

0 comments on commit 83ebd80

Please sign in to comment.