From 997929fed0dcbed210086099ff8b8fa15581abbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 23 Mar 2012 18:38:50 +0100 Subject: [PATCH] Integer, Numeric and Float allow None as value NULL value is None and not False issue2022 review237004 --- product.py | 4 ++-- uom.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/product.py b/product.py index 112d058f92..9e6a158118 100644 --- a/product.py +++ b/product.py @@ -33,11 +33,11 @@ class Template(ModelSQL, ModelView): category = fields.Many2One('product.category', 'Category', states=STATES, depends=DEPENDS) list_price = fields.Property(fields.Numeric('List Price', states=STATES, - digits=(16, 4), depends=DEPENDS)) + digits=(16, 4), depends=DEPENDS, required=True)) list_price_uom = fields.Function(fields.Numeric('List Price', digits=(16, 4)), 'get_price_uom') cost_price = fields.Property(fields.Numeric('Cost Price', - states=STATES, digits=(16, 4), depends=DEPENDS)) + states=STATES, digits=(16, 4), depends=DEPENDS, required=True)) cost_price_uom = fields.Function(fields.Numeric('Cost Price', digits=(16, 4)), 'get_price_uom') cost_price_method = fields.Property(fields.Selection([ diff --git a/uom.py b/uom.py index d94a92497e..b502389ae1 100644 --- a/uom.py +++ b/uom.py @@ -46,7 +46,7 @@ class Uom(ModelSQL, ModelView): 'coef (base unit) = 1 (this unit)') rounding = fields.Float('Rounding Precision', digits=(12, 12), required=True, states=STATES, depends=DEPENDS) - digits = fields.Integer('Display Digits') + digits = fields.Integer('Display Digits', required=True) active = fields.Boolean('Active') def init(self, module_name):