diff --git a/CHANGELOG b/CHANGELOG index 6889003a32..ff4b2a9640 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Fix digits of start and end balance + Version 1.2.0 - 2009-04-20 * Bug fixes (see mercurial logs for details) diff --git a/statement.py b/statement.py index 848296c551..69d1e20d95 100644 --- a/statement.py +++ b/statement.py @@ -19,9 +19,10 @@ class Statement(ModelWorkflow, ModelSQL, ModelView): currency_digits = fields.Function('get_currency_digits', type='integer', string='Currency Digits', on_change_with=['journal']) date = fields.Date('Date', required=True, states=_STATES, select=1) - start_balance = fields.Numeric('Start Balance', digits=(16, 2), - states=_STATES) - end_balance = fields.Numeric('End Balance', digits=(16, 2), states=_STATES) + start_balance = fields.Numeric('Start Balance', digits="(16, currency_digits)", + states=_STATES, depends=['currency_digits']) + end_balance = fields.Numeric('End Balance', digits="(16, currency_digits)", + states=_STATES, depends=['currency_digits']) lines = fields.One2Many('account.statement.line', 'statement', 'Transactions', states={ 'readonly': "(state != 'draft') or (not bool(journal))",