When using a mode with "Group Transactions in Payment Orders"
in a payment order with multiple bills from the same supplier,
if e.g. the first bill's payment amount is reduced, the
reduction was applied to the last bill instead of the specified one.
Gather all the errors to only show one with all the problem on the current debit order. This will avoid for the users to have to make multiple time the same process.
The previous approach creates manually the journal entries and does all
the hard work, plus not being 100% compatible with the bank statement
reconciliation widget (requiring a patch on OCB to see blue lines).
That decision made sense on the moment it was done (v9), where the
native payment model (account.payment) was very limited, and wasn't able
to store all the needed information for the bank transaction.
Now that the limitations are gone, we can get rid off this extra model,
and generate instead `account.payment` records, using both the native
model + methods to perform the same operations.
This serves also to workaround the problem found in #966.
All the code, views and tests of main module have been adapted to this
new approach in this commit. Later commits will adapt the rest of the
modules of the suite, and add migration scripts to transit from the
previous approach to this new one.
TT39832
Don't set reference_type field on account.move required=True, because it
causes a lot of problems in other modules that don't depend on this one.
Setting it as required in the view is enough.
Update move line generation to get transfer account from bank journal
Update payment mode configuration accordingly (3 fields removed)
Several improvements in payment order tree and form view
Steps to reproduce
------------------
* Create a payment mode with "Link to Bank Account" = "Variable".
* Select several journals.
* Create a payment order with that payment mode.
* Save.
* Go to other menu and come back to payment order.
* Try to select a journal: the list is empty.
Fixes#544
context of payment orders, she should ocus on the amount that
is due to be paid. In this method we are forcing to display both
the amount due in company and in the invoice currency.
We then hide the fields debit and credit, because they add no value.
* FIX: Bug #353 crash when selecting a payment mode that has a variable link to a bank account
* FIX: Add 'post_move' option on account.payment.mode with default True, to keep the previous behavior
* IMP: Explicit error when bank account is missing on bank journal
* IMP: Add field default_date_prefered on payment mode.
* IMP: extensibility of _prepare_move
Pass the list of bank lines to _prepare_move so it is possible to customize the move (eg it's name) based on the lines being paid.
* FIX: payment order: add missing onchange dependencies in move selection wizard
Take into account all the remaining remarks of Frederic Clementi dated May 30:
- see multi-currency amounts in the wizard to add transaction lines
- add help msg on bank payment lines
Improvements include:
- full re-organisation of modules and big re-organisation of the code
- simplification of the code related to the fact that support for direct debit is now in t
he base module, not added by an optional module account_direct_debit (module was removed)
- new design of the wizard to select move lines to pay
- support for non-SEPA file transfer-
- support for German direct debit SEPA files (fixes bug #129)
- remove workflow of payment.order
- add wizard of selection of move lines to pay