From 63e262a88e1d8059ac163e3235fcdefe491e8317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 23 Mar 2012 18:38:51 +0100 Subject: [PATCH] Integer, Numeric and Float allow None as value NULL value is None and not False issue2022 review237004 --- stock.py | 2 +- tests/scenario_account_stock_anglo_saxon.rst | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/stock.py b/stock.py index 72eab2f0a2..68e0600dc4 100644 --- a/stock.py +++ b/stock.py @@ -8,7 +8,7 @@ from trytond.pool import Pool class Move(ModelSQL, ModelView): _name = 'stock.move' - anglo_saxon_quantity = fields.Float('Anglo-Saxon Quantity', + anglo_saxon_quantity = fields.Float('Anglo-Saxon Quantity', required=True, digits=(16, Eval('unit_digits', 2)), depends=['unit_digits']) def __init__(self): diff --git a/tests/scenario_account_stock_anglo_saxon.rst b/tests/scenario_account_stock_anglo_saxon.rst index 9f635fd633..1e5650aef0 100644 --- a/tests/scenario_account_stock_anglo_saxon.rst +++ b/tests/scenario_account_stock_anglo_saxon.rst @@ -154,6 +154,7 @@ Create product:: >>> product.list_price = Decimal('10') >>> product.cost_price = Decimal('5') >>> product.cost_price_method = 'fixed' + >>> product.delivery_time = 0 >>> product.account_expense = expense >>> product.account_revenue = revenue >>> product.account_stock = stock @@ -174,7 +175,7 @@ Create payment term:: >>> PaymentTerm = Model.get('account.invoice.payment_term') >>> PaymentTermLine = Model.get('account.invoice.payment_term.line') >>> payment_term = PaymentTerm(name='Direct') - >>> payment_term_line = PaymentTermLine(type='remainder') + >>> payment_term_line = PaymentTermLine(type='remainder', days=0) >>> payment_term.lines.append(payment_term_line) >>> payment_term.save()