mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
[MIG] product_harmonized_system to v15
TT36971
This commit is contained in:
committed by
Víctor Martínez
parent
c7046838a5
commit
379b73e11d
@@ -4,6 +4,8 @@
|
||||
# @author Luc de Meyer <info@noviat.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from textwrap import shorten
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
@@ -81,7 +83,7 @@ class HSCode(models.Model):
|
||||
name = this.local_code
|
||||
if this.description:
|
||||
name += " " + this.description
|
||||
name = len(name) > 55 and name[:55] + "..." or name
|
||||
name = shorten(name, 55)
|
||||
res.append((this.id, name))
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user