From 0f532c3dbf0d4854b5175ad22ce264204f94e182 Mon Sep 17 00:00:00 2001 From: Pierre Masereel Date: Thu, 2 May 2019 13:07:33 +0000 Subject: [PATCH 01/14] [FIX] delivery: picking weight computation The depends value on picking weight and package_ids of picking are only set on the move_line_ids, which lead to compute the value of the picking weight only when move lines are created or deleted and not when a package is set on a line, quantity done changed and/or unit of measure changed. To fix this issue, we've changed the depends, of thos computed fields. closes odoo/odoo#33114 Signed-off-by: pimodoo --- addons/delivery/models/stock_picking.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/delivery/models/stock_picking.py b/addons/delivery/models/stock_picking.py index be94eecfc51..5e41bdaa3a8 100644 --- a/addons/delivery/models/stock_picking.py +++ b/addons/delivery/models/stock_picking.py @@ -59,7 +59,7 @@ class StockPicking(models.Model): return weight_uom_id @api.one - @api.depends('move_line_ids') + @api.depends('move_line_ids', 'move_line_ids.result_package_id') def _compute_packages(self): self.ensure_one() packs = set() @@ -69,7 +69,7 @@ class StockPicking(models.Model): self.package_ids = list(packs) @api.one - @api.depends('move_line_ids') + @api.depends('move_line_ids', 'move_line_ids.result_package_id', 'move_line_ids.product_uom_id', 'move_line_ids.qty_done') def _compute_bulk_weight(self): weight = 0.0 for move_line in self.move_line_ids: From ab1bd93dde170afbfae24f68c8e39012295197f1 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Thu, 18 Apr 2019 09:45:52 +0000 Subject: [PATCH 02/14] [FIX] web: Trim spaces when selecting option by text It's quite common that the `$().text()` method returns lots of random whitespaces at the beginning and end of the string. They're pretty unpredictable (extension views can add or remove them) and invisible to the end user. This code chunk should allow to select an `