From ea5f894f38f36a15fee9b0d33bc183336f5132cc Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Thu, 8 Apr 2010 14:15:58 +0200 Subject: [PATCH] Write must evaluate the type of ids (transplanted from a9e22d81068dd0529b7f7f5b0415066d066cea73) --- account.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/account.py b/account.py index 7059c45df2..a0b47d05af 100644 --- a/account.py +++ b/account.py @@ -56,6 +56,10 @@ class FiscalYear(ModelSQL, ModelView): def write(self, cursor, user, ids, vals, context=None): invoice_obj = self.pool.get('account.invoice') + + if isinstance(ids, (int, long)): + ids = [ids] + for sequence in ('out_invoice_sequence', 'in_invoice_sequence', 'out_credit_note_sequence', 'in_credit_note_sequence'): if vals.get(sequence):