From 970713eb4a2eb3d5f581e1e67fc5e0ff28a1d069 Mon Sep 17 00:00:00 2001 From: Andreu Orensanz Date: Fri, 15 Mar 2024 11:09:33 +0100 Subject: [PATCH] [FIX] product_harmonized_system: Resolve AttributeError in hs_code _compute_display_name --- product_harmonized_system/README.rst | 2 +- product_harmonized_system/__manifest__.py | 2 +- product_harmonized_system/models/hs_code.py | 2 +- product_harmonized_system/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/product_harmonized_system/README.rst b/product_harmonized_system/README.rst index 89c6030..82b549c 100644 --- a/product_harmonized_system/README.rst +++ b/product_harmonized_system/README.rst @@ -7,7 +7,7 @@ Product Harmonized System Codes !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:87cce17de216fe1cc60ec8f8284df8096d0d1e865ff956f1e6854b8a41b88c82 + !! source digest: sha256:19e8bde778d223f0b92f5e26d584df2e3135279bc6b215fbaaf91864b4e464fb !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/product_harmonized_system/__manifest__.py b/product_harmonized_system/__manifest__.py index 7616199..65d7379 100644 --- a/product_harmonized_system/__manifest__.py +++ b/product_harmonized_system/__manifest__.py @@ -10,7 +10,7 @@ { "name": "Product Harmonized System Codes", - "version": "17.0.1.1.0", + "version": "17.0.1.2.0", "category": "Reporting", "license": "AGPL-3", "summary": "Base module for Product Import/Export reports", diff --git a/product_harmonized_system/models/hs_code.py b/product_harmonized_system/models/hs_code.py index c7b1221..f25afe9 100644 --- a/product_harmonized_system/models/hs_code.py +++ b/product_harmonized_system/models/hs_code.py @@ -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) diff --git a/product_harmonized_system/static/description/index.html b/product_harmonized_system/static/description/index.html index e8198c8..9938c91 100644 --- a/product_harmonized_system/static/description/index.html +++ b/product_harmonized_system/static/description/index.html @@ -366,7 +366,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:87cce17de216fe1cc60ec8f8284df8096d0d1e865ff956f1e6854b8a41b88c82 +!! source digest: sha256:19e8bde778d223f0b92f5e26d584df2e3135279bc6b215fbaaf91864b4e464fb !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/intrastat-extrastat Translate me on Weblate Try me on Runboat

This module contains the objects for Harmonised System Codes (H.S.