Skip to content

Commit

Permalink
fixup! sh_reception_packaging_dimension: refactor to allow module to …
Browse files Browse the repository at this point in the history
…extend
  • Loading branch information
TDu committed Jul 25, 2023
1 parent b9e9643 commit 40bcfc2
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions shopfloor_reception_packaging_dimension/services/reception.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,21 @@ def _before_response_for_set_quantity(self, picking, line):
return self._response_for_set_quantity(picking, line)

def _get_domain_packaging_needs_dimension(self):
return [
"|",
"|",
"|",
"|",
"|",
"|",
"|",
"|",
"|",
"|",
("packaging_length", "=", 0),
("packaging_length", "=", False),
("width", "=", 0),
("width", "=", False),
("height", "=", 0),
("height", "=", False),
("max_weight", "=", 0),
("max_weight", "=", False),
("qty", "=", 0),
("qty", "=", False),
("barcode", "=", False),
]
return expression.OR(
[
[("packaging_length", "=", 0)],
[("packaging_length", "=", False)],
[("width", "=", 0)],
[("width", "=", False)],
[("height", "=", 0)],
[("height", "=", False)],
[("max_weight", "=", 0)],
[("max_weight", "=", False)],
[("qty", "=", 0)],
[("qty", "=", False)],
[("barcode", "=", False)],
]
)

def _get_next_packaging_to_set_dimension(self, product, previous_packaging=None):
"""Return for a product the next packaging needing dimension to be set."""
Expand Down

0 comments on commit 40bcfc2

Please sign in to comment.