Having 2 lines for the reference (one for the type and the other for
the reference itself) steals vertical space to the really important
things in the invoice: the lines, so we compact them into one line
for better ergonomics.
Method ``_get_reconciled_invoices_partials()`` returns 2 lists:
- the first one contains triplets defined as (account.partial.reconcile record, amount, account.move.line record)
- the second one contains account.move IDs
Merging the 2 lists and cycling over them with
```
for (_x, _y, payment_move_line) in list1 + list2:
...
```
resulted in ``TypeError: cannot unpack non-iterable int object``.
This commit fixes this bug.
- Create setUpClass method
- Switch to setUpClass (if needed) for avoiding repeat the same setup for each test.
- Include context keys for avoiding mail operations overhead.
On certain v16 instances, although the partner bank account that is
being pre-set in the account.payment creation values dictionary:
https://github.com/OCA/bank-payment/blob/fc7783669f40d85/account_payment_order/models/account_payment_line.py#L206
it's being marked as dirty (it's a computed writable field), and thus,
being recomputed before being saved, getting an invalid value (on
direct debits, the company's bank account).
The triggers that lead to this situation are unknown due to the low
level where it's happening and the tons of interactions being taken in
place, so the best way to deal with this is to override the compute
method that computes this value, so even if the field is recomputed, it
gets the correct value.
Let's be pragmatic...
TT50804
Compatibility with https://github.com/OCA/bank-payment/pull/1306
The payment (account.payment) and the account entry (account.move) are defined with today's date,
but the "important" date is the date of the line, therefore the payment_line_date field is created.
The modules account_banking_sepa_sepa_direct_debit + account_banking_sepa_credit_transfer
to use the payment_line_date field.
TT49988
The payment line reference type takes its value from the invoice reference
type, and both fields must have the same options.
The missing option "structured" causes a bug during payment creation.
the test is modified to be able to reproduce the problem.
In v13 the existing behavior was defined with today's date the Transfer Move, therefore, we define
that behavior by default without configuration since it is the expected behavior.
https://github.com/OCA/bank-payment/pull/805/files
TT49582
Odoo core already includes a mechanism, only activated in enterprise,
to mark invoices reconciled against a payment as "In payment", not as
"Paid", and then when the bank reconciliation is done, passed to "Paid".
As we already refactored the payment order transfer entries generation
to be done by payments, the only missing bits is to override the method
that returns the payment state to put.
We have limited this new payment state though to those invoices that
are part of a payment order, not all including those which were paid
pressing the button "Register payment", as that's out of the scope
of this module.
TT49386