From 4b68854b65dfdc9b0b015928300a28b78d904903 Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Mon, 22 Aug 2011 13:29:40 +0200 Subject: [PATCH] Remove field names beginning with 'analytic_account_' from defaults. issue1830 review85001 --- purchase.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/purchase.py b/purchase.py index 9b2befd56e..ddc320220f 100644 --- a/purchase.py +++ b/purchase.py @@ -67,6 +67,11 @@ class PurchaseLine(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(PurchaseLine, self).default_get(fields, + with_rec_name=with_rec_name) + def read(self, ids, fields_names=None): selection_obj = Pool().get('analytic_account.account.selection')