From b29a3f7ed2ce1652ec985ac51b5030dc7f9910eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 20 Oct 2013 20:43:58 +0200 Subject: [PATCH] Fix states of analytic account fields Set the same state of the real one2many and use a custom one for required. issue3012 review1151003 --- invoice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index d96eb9ac37..4ce6714306 100644 --- a/invoice.py +++ b/invoice.py @@ -35,7 +35,9 @@ class InvoiceLine: ['analytic_accounts'])['analytic_accounts'] fields.update(AnalyticAccount.analytic_accounts_fields_get( - analytic_accounts_field, fields_names)) + analytic_accounts_field, fields_names, + states=cls.analytic_accounts.states, + required_states=Eval('type') == 'line')) return fields @classmethod