From 7204d618bd6ef6a0523122bc9722c98a01744017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 17 Feb 2022 00:50:01 +0100 Subject: [PATCH] Add help text for measurements issue11211 review386011002 --- product.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/product.py b/product.py index 154d1aadec..35d416b49f 100644 --- a/product.py +++ b/product.py @@ -15,8 +15,9 @@ class Template(metaclass=PoolMeta): states={ 'invisible': Eval('type').in_(NON_MEASURABLE), }, - depends=['type']) - length_uom = fields.Many2One('product.uom', 'Length Uom', + depends=['type'], + help="Length for 1 default UOM.") + length_uom = fields.Many2One('product.uom', 'Length UOM', domain=[('category', '=', Id('product', 'uom_cat_length'))], states={ 'invisible': Eval('type').in_(NON_MEASURABLE), @@ -28,8 +29,9 @@ class Template(metaclass=PoolMeta): states={ 'invisible': Eval('type').in_(NON_MEASURABLE), }, - depends=['type']) - height_uom = fields.Many2One('product.uom', 'Height Uom', + depends=['type'], + help="Height for 1 default UOM.") + height_uom = fields.Many2One('product.uom', 'Height UOM', domain=[('category', '=', Id('product', 'uom_cat_length'))], states={ 'invisible': Eval('type').in_(NON_MEASURABLE), @@ -41,8 +43,9 @@ class Template(metaclass=PoolMeta): states={ 'invisible': Eval('type').in_(NON_MEASURABLE), }, - depends=['type']) - width_uom = fields.Many2One('product.uom', 'Width Uom', + depends=['type'], + help="Width for 1 default UOM.") + width_uom = fields.Many2One('product.uom', 'Width UOM', domain=[('category', '=', Id('product', 'uom_cat_length'))], states={ 'invisible': Eval('type').in_(NON_MEASURABLE), @@ -56,8 +59,9 @@ class Template(metaclass=PoolMeta): 'readonly': (Bool(Eval('length')) & Bool(Eval('height')) & Bool(Eval('width'))), }, - depends=['type']) - volume_uom = fields.Many2One('product.uom', 'Volume Uom', + depends=['type'], + help="Volume for 1 default UOM.") + volume_uom = fields.Many2One('product.uom', 'Volume UOM', domain=[('category', '=', Id('product', 'uom_cat_volume'))], states={ 'invisible': Eval('type').in_(NON_MEASURABLE), @@ -69,8 +73,9 @@ class Template(metaclass=PoolMeta): states={ 'invisible': Eval('type').in_(NON_MEASURABLE), }, - depends=['type']) - weight_uom = fields.Many2One('product.uom', 'Weight Uom', + depends=['type'], + help="Weight for 1 default UOM.") + weight_uom = fields.Many2One('product.uom', 'Weight UOM', domain=[('category', '=', Id('product', 'uom_cat_weight'))], states={ 'invisible': Eval('type').in_(NON_MEASURABLE),