Reviewers: ,
Description:
Module: analytic_sale
Please review this at http://codereview.tryton.org/77007/
Affected files:
M sale.py
Index: sale.py
===================================================================
--- a/sale.py
+++ b/sale.py
@@ -30,16 +30,21 @@ class SaleLine(ModelSQL, ModelView):
analytic_accounts_field = super(SaleLine, self).fields_get(
['analytic_accounts'])['analytic_accounts']
res.update(analytic_account_obj.analytic_accounts_fields_get(
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 = Pool().get('analytic_account.account.selection')
int_id = False
if isinstance(ids, (int, long)):
int_id = True
ids = [ids]
--
[email protected] mailing list