details:   https://code.tryton.org/tryton/commit/e787aff12b41
branch:    default
user:      Cédric Krier <[email protected]>
date:      Thu Jan 22 17:38:18 2026 +0100
description:
        Prevent registering unit of measure with the UNECE code ZZ and XZZ

        The mutually defined unit is not a real unit.
diffstat:

 modules/edocument_unece/product.py |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r 65ef36edc7c6 -r e787aff12b41 modules/edocument_unece/product.py
--- a/modules/edocument_unece/product.py        Mon Jan 19 16:21:30 2026 +0100
+++ b/modules/edocument_unece/product.py        Thu Jan 22 17:38:18 2026 +0100
@@ -8,5 +8,8 @@
     __name__ = 'product.uom'
 
     unece_code = fields.Char("UNECE Code",
+        domain=[
+            ('unece_code', 'not in', ['ZZ', 'XZZ']),
+            ],
         help="Standard code of "
         "the United Nations Economic Commission for Europe.")

Reply via email to