Remove field names beginning with 'analytic_account_' from defaults.

issue1830
review77007
(transplanted from da17901061048df2c61bbd00786a23ac64b2018a)
This commit is contained in:
Udo Spallek
2011-08-22 14:01:08 +02:00
parent ca09632423
commit 3c669b142c
+5
View File
@@ -33,6 +33,11 @@ class SaleLine(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(SaleLine, 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')