diff --git a/addons/delivery/models/stock_picking.py b/addons/delivery/models/stock_picking.py index 85a2db8cf53..d006e7fd036 100644 --- a/addons/delivery/models/stock_picking.py +++ b/addons/delivery/models/stock_picking.py @@ -63,7 +63,7 @@ class StockPicking(models.Model): weight += move_line.product_uom_id._compute_quantity(move_line.qty_done, move_line.product_id.uom_id) * move_line.product_id.weight picking.weight_bulk = weight - @api.depends('package_ids', 'weight_bulk') + @api.depends('package_ids', 'package_ids.shipping_weight', 'weight_bulk') def _compute_shipping_weight(self): for picking in self: picking.shipping_weight = picking.weight_bulk + sum([pack.shipping_weight for pack in picking.package_ids]) diff --git a/addons/delivery/wizard/choose_delivery_package.py b/addons/delivery/wizard/choose_delivery_package.py index 8c54c7e130a..789e74e0d72 100644 --- a/addons/delivery/wizard/choose_delivery_package.py +++ b/addons/delivery/wizard/choose_delivery_package.py @@ -60,5 +60,5 @@ class ChooseDeliveryPackage(models.TransientModel): # write shipping weight and product_packaging on 'stock_quant_package' if needed if self.delivery_packaging_id: delivery_package.packaging_id = self.delivery_packaging_id - if self.shipping_weight: - delivery_package.shipping_weight = self.shipping_weight + if self.shipping_weight: + delivery_package.shipping_weight = self.shipping_weight