[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) <nle@odoo.com>
This commit is contained in:
Nicolas Lempereur
2021-08-19 15:57:08 +00:00
parent aee858dbc3
commit 22eacc094b
+1 -1
View File
@@ -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':