Reviewers: ,
Description:
Module: analytic_invoice
Please review this at http://codereview.tryton.org/76005/
Affected files:
M invoice.py
Index: invoice.py
===================================================================
--- a/invoice.py
+++ b/invoice.py
@@ -30,16 +30,21 @@ class InvoiceLine(ModelSQL, ModelView):
analytic_accounts_field = super(InvoiceLine, 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(InvoiceLine, 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