mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX] added check for size before list access + corrected base columns for transaction ref
This commit is contained in:
committed by
Guewen Baconnier
parent
c4a1f50e50
commit
b5e62298ae
@@ -30,16 +30,8 @@ class EasyReconcileAdvanced(orm.AbstractModel):
|
|||||||
""" Mandatory columns for move lines queries
|
""" Mandatory columns for move lines queries
|
||||||
An extra column aliased as ``key`` should be defined
|
An extra column aliased as ``key`` should be defined
|
||||||
in each query."""
|
in each query."""
|
||||||
aml_cols = (
|
aml_cols = super(easy_reconcile_advanced, self).\
|
||||||
'id',
|
_base_columns(rec)
|
||||||
'debit',
|
aml_cols += ['account_move_line.transaction_ref']
|
||||||
'credit',
|
return aml_cols
|
||||||
'date',
|
|
||||||
'period_id',
|
|
||||||
'ref',
|
|
||||||
'name',
|
|
||||||
'partner_id',
|
|
||||||
'account_id',
|
|
||||||
'move_id',
|
|
||||||
'transaction_ref')
|
|
||||||
return ["account_move_line.%s" % col for col in aml_cols]
|
|
||||||
|
|||||||
@@ -200,6 +200,7 @@ class EasyReconcileBase(orm.AbstractModel):
|
|||||||
# reconciled and if all the lines were the same, in such
|
# reconciled and if all the lines were the same, in such
|
||||||
# case, just skip the group and consider it as partially
|
# case, just skip the group and consider it as partially
|
||||||
# reconciled (no change).
|
# reconciled (no change).
|
||||||
|
if lines:
|
||||||
existing_partial_id = lines[0]['reconcile_partial_id']
|
existing_partial_id = lines[0]['reconcile_partial_id']
|
||||||
if existing_partial_id:
|
if existing_partial_id:
|
||||||
partial_line_ids = set(ml_obj.search(
|
partial_line_ids = set(ml_obj.search(
|
||||||
|
|||||||
Reference in New Issue
Block a user