From 022cfff4f502891c590ac0ef1bb46e6cc8f25476 Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Mon, 22 Aug 2011 13:25:37 +0200 Subject: [PATCH] Remove field names beginning with 'analytic_account_' from defaults. issue1830 review76005 (transplanted from d4968377b04bde30bed36b55727e7c047254685e) --- invoice.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/invoice.py b/invoice.py index 4af1bfce00..a1fbf1ab62 100644 --- a/invoice.py +++ b/invoice.py @@ -33,6 +33,11 @@ class InvoiceLine(ModelSQL, ModelView): analytic_accounts_field, fields_names)) return res + def default_get(self, fields, with_rec_name=True): + fields = [x for x in fields if not x.startswith('analytic_account_')] + return super(InvoiceLine, self).default_get(fields, + with_rec_name=with_rec_name) + def read(self, ids, fields_names=None): selection_obj = self.pool.get('analytic_account.account.selection')