- fix set partner_bank_id in account move lines
Case: The bank account isn't set properly in the payment order lines, because the bank account is only got from account.move.line or the first bank account in the partner_id, but never from the invoice (account.move).
Solution: With this fix, the bank account will be get from account.move when matching the criteria.
- fix payment orders from invoice tree view
Case: User can't add invoices to payment/debit orders from the tree view but it's still possible to add them one by one from the form view.
Solution: Remove binding_views="form": by default are "tree & form". With this fix, users can add payment/debit orders from the invoice tree view
- fix the attachment file name & dowload.
Case: After the configuration of a debit order and generating the .xml file, user can't download it from the next step screen using the download link.
Solution: This fix makes the .xml file downloadable from the .xml file name as it was in older versions
When you haven't still generated the file, `generated_user_id` is not filled, and
so, you can't control the language in which the payment order is going to be printed.
Adding a condition for using the user language in that case makes this more
comfortable.
Previous tests did several risk operations on tests, like performing an unbound search
on payment orders, what can lead to errors if there are some data on DB (or for example
we add in the future some payment orders in demo.
This commit also split the tests for inbound payment in a base inheritable class that
can be reused in other dependant modules, and the test of this module.
Finally, we use SavepointCase for improving performance in tests.
- allow add to order from invoice if order exists
- payment line creation from move line
Benefits of the batch creation of Odoo 12.0
The method returns the created payment lines
- split generate_move method
- only payment order option on payment methods
New option on payment methods: payment order only (unchecked by default) allowing to enforce the use of payment orders for some payment methods
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
* Removed deprecated YAML tests.
* Removed document dependency, as now there's no attachment dropdown.
* Switched deprecated `compute` method of res.currency.
* Restored missing field `reference_type` in invoices.
* Fixed call to `message_post`.
* Added missing description in model.
Adds 'structured' to the invoice_reference_type2communication_type ans the 'structured' type is added by the module itself in account_invoice but breaks the account_move_line.py as explained here: https://github.com/OCA/bank-payment/issues/495
- when manually encoding a payment line, get company currency as default currency
- Search on payment order numbers
- Direct search on bank journal name in payment orders
- remove widget="selection" on account.payement.mode : this object is rarely modified, so widget='selection' is not a time saver, but we miss the HTML link, which can be pretty convenient to check the configuration.
When adding to a payment order from invoices, the payment mode
considered is the one in the invoice, but once you have confirmed it,
you can't change it, so if you change the payment mode in the journal
items, it doesn't make the difference.
With this change, this is taken into account for adding to the
payment order(s) properly.
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.