diff --git a/product_total_weight_from_packaging/models/product.py b/product_total_weight_from_packaging/models/product.py index 9799ca3cfc2..81a445faa17 100644 --- a/product_total_weight_from_packaging/models/product.py +++ b/product_total_weight_from_packaging/models/product.py @@ -11,7 +11,7 @@ def get_total_weight_from_packaging(self, qty): self.ensure_one() qty_by_packaging_with_weight = self.with_context( **{ - "_packaging_filter": lambda p: p.max_weight, + "_packaging_filter": lambda p: p.weight, "_packaging_values_handler": self._prepare_qty_by_packaging_values_with_weight, # noqa } ).product_qty_by_packaging(qty) @@ -33,5 +33,5 @@ def _prepare_qty_by_packaging_values_with_weight( res["weight"] = self.weight else: packaging = self.env["product.packaging"].browse(packaging_tuple.id) - res["weight"] = packaging.max_weight + res["weight"] = packaging.weight return res