Skip to content
Snippets Groups Projects
Commit 6193f9bf authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[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#75287

X-original-commit: 857ab577
Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent cd25e2e3
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,7 @@ class Location(models.Model):
_sql_constraints = [('barcode_company_uniq', 'unique (barcode,company_id)', 'The barcode for a location must be unique per company !')]
@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':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment