[FIX] account: fixed get_pair_to_reconcile() in case there is a manual reconciliation done via the wizard on an account that has a secondary currency set. In that case, the currency to consider is always given by the special key 'skip_full_reconcile_check' in the context. OPW 682368
This commit is contained in:
@@ -759,6 +759,10 @@ class AccountMoveLine(models.Model):
|
||||
#or if all lines share the same currency
|
||||
field = 'amount_residual_currency'
|
||||
rounding = self[0].currency_id.rounding
|
||||
if self._context.get('skip_full_reconcile_check') == 'amount_currency_excluded':
|
||||
field = 'amount_residual'
|
||||
elif self._context.get('skip_full_reconcile_check') == 'amount_currency_only':
|
||||
field = 'amount_residual_currency'
|
||||
#target the pair of move in self that are the oldest
|
||||
sorted_moves = sorted(self, key=lambda a: a.date)
|
||||
debit = credit = False
|
||||
|
||||
Reference in New Issue
Block a user