Prevent crash if 2 packages have the same name

This commit is contained in:
Guewen Baconnier
2020-07-23 13:48:19 +02:00
parent a7d8fe6a7d
commit c228f27bfa

View File

@@ -117,7 +117,7 @@ class VerticalLiftOperationPut(models.Model):
def _find_move_line_for_package(self, package):
domain = AND(
[self._domain_move_lines_to_do_all(), [("package_id", "=", package.id)]]
[self._domain_move_lines_to_do_all(), [("package_id", "in", package.ids)]]
)
return self.env["stock.move.line"].search(domain, limit=1)