[FIX] product_harmonized_system: Resolve AttributeError in hs_code _compute_display_name

This commit is contained in:
Andreu Orensanz
2024-03-15 11:09:33 +01:00
committed by Lukas Tran
parent 95f4be984c
commit 970713eb4a
4 changed files with 4 additions and 4 deletions

View File

@@ -84,7 +84,7 @@ class HSCode(models.Model):
@api.depends("local_code", "description")
def _compute_display_name(self):
for this in self:
name = this.local_code
name = this.local_code or ""
if this.description:
name += " " + this.description
name = shorten(name, 55)