From 22eacc094bb3488efe746ed18d3a5a1ee96ca7f7 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 18 Aug 2021 15:16:36 +0000 Subject: [PATCH] [FIX] stock: update view location name usage Slight inconsistency, you could have a view location type not update when the usage was changed to or from view (the hierarchy would be shown which should not be the case). opw-2619043 closes odoo/odoo#75338 X-original-commit: 857ab57756e19525681f0abd36e7f07144f56eed Signed-off-by: Nicolas Lempereur (nle) --- addons/stock/models/stock_location.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/stock_location.py b/addons/stock/models/stock_location.py index e2736b1f2c8..58ae5fab3e8 100644 --- a/addons/stock/models/stock_location.py +++ b/addons/stock/models/stock_location.py @@ -105,7 +105,7 @@ class Location(models.Model): for line in outgoing_move_lines: location.forecast_weight -= line.product_id.weight * line.product_qty - @api.depends('name', 'location_id.complete_name') + @api.depends('name', 'location_id.complete_name', 'usage') def _compute_complete_name(self): for location in self: if location.location_id and location.usage != 'view':