[FIX] added check for size before list access + corrected base columns for transaction ref

This commit is contained in:
Matthieu Dietrich
2014-07-21 12:08:34 +02:00
committed by Guewen Baconnier
parent c4a1f50e50
commit b5e62298ae
2 changed files with 14 additions and 21 deletions

View File

@@ -30,16 +30,8 @@ class EasyReconcileAdvanced(orm.AbstractModel):
""" Mandatory columns for move lines queries
An extra column aliased as ``key`` should be defined
in each query."""
aml_cols = (
'id',
'debit',
'credit',
'date',
'period_id',
'ref',
'name',
'partner_id',
'account_id',
'move_id',
'transaction_ref')
return ["account_move_line.%s" % col for col in aml_cols]
aml_cols = super(easy_reconcile_advanced, self).\
_base_columns(rec)
aml_cols += ['account_move_line.transaction_ref']
return aml_cols