mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[IMP] account_payment_order_grouped_output: Maturity date in grouped moves
For propagating maturity dates from the individual payment moves to the grouped ones, 2 actions are taken: - For the counterpart that will neutralize each payment, we put the maturity date according to the same logic as the payment one. - For the grouped AR/AP, we put the first payment date of all the grouped payments, as all of them should be the same after grouping by this criterium in _prepare_trf_moves. TT50671
This commit is contained in:
@@ -136,6 +136,8 @@ class AccountPaymentOrder(models.Model):
|
|||||||
),
|
),
|
||||||
"currency_id": payment.currency_id.id,
|
"currency_id": payment.currency_id.id,
|
||||||
"amount_currency": payment.amount * sign,
|
"amount_currency": payment.amount * sign,
|
||||||
|
# Same logic as the individual payments
|
||||||
|
"date_maturity": payment.payment_line_ids[0].date,
|
||||||
}
|
}
|
||||||
return vals
|
return vals
|
||||||
|
|
||||||
@@ -169,6 +171,8 @@ class AccountPaymentOrder(models.Model):
|
|||||||
),
|
),
|
||||||
"currency_id": payments[0].currency_id.id,
|
"currency_id": payments[0].currency_id.id,
|
||||||
"amount_currency": amount_payment_currency * sign,
|
"amount_currency": amount_payment_currency * sign,
|
||||||
|
# All the lines should have the same date following _prepare_trf_moves
|
||||||
|
"date_maturity": payments.payment_line_ids[:1].date,
|
||||||
}
|
}
|
||||||
return vals
|
return vals
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user