Commit Graph

27 Commits

Author SHA1 Message Date
Pedro M. Baeza
b8d818967b [REF+IMP] account_payment_order: Use native payments
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
2022-12-25 12:51:03 +01:00
Vandan-OSI
f03867a218 [FIX] FIX Code for None communication Value. 2022-06-29 15:26:02 +05:30
Denis Roussel
c4e2f64334 [14.0][FIX] account_payment_order: Don't duplicate communication reference 2022-04-22 14:14:53 +02:00
Denis Roussel
e346c66e4b [14.0][IMP] account_payment_order: Add existing payment references to communication
If some movements have been reconciled with the original invoice,
their references should be added in communication too.

e.g.: Manual credit notes
2022-04-19 11:50:52 +02:00
Denis Roussel
18495aaf03 [14.0][IMP] account_payment_order: Use the 'payment_reference' field if filled in 2022-04-14 13:40:43 +02:00
Denis Roussel
919928e98f [14.0][IMP] account_payment_order: Remove not needed assert as parameter is required 2022-04-14 11:20:59 +02:00
Denis Roussel
becc8ac426 [14.0][IMP] account_payment_order: Improve normal communication if there is a credit note
If there is a credit note that partially cancel an invoice, the payment communication
should be the combination of the invoice reference and the credit note one.
2022-04-14 11:16:37 +02:00
Denis Roussel
da8e2da5bb [14.0][IMP] account_payment_order: Add a hook method to retrieve communication type and communication 2022-04-14 09:26:00 +02:00
Miquel Raïch
af433396ff [IMP] account_payment_order: don't requiere reference_type anymore 2022-03-08 15:35:00 +01:00
manu
7bdb286aa1 [IMP]account_payment_order: payment date when adding transaction line 2021-06-02 15:58:42 +02:00
Carlos Roca
a7a5006ff4 [MIG] account_payment_order: Migration to v14 2021-01-05 14:17:34 +01:00
Jesús Alan Ramos Rodríguez
bd5c8b24ec [MIG] account_payment_order: Migration to 14.0 2021-01-05 14:03:52 +01:00
Andrea
5138c5ce2b [FIX] avoid cache miss in compute 2021-01-05 14:03:52 +01:00
Valentin Vinagre Urteaga
232b17b423 [FIX] account_payment_order: 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.
2021-01-05 14:03:52 +01:00
Raf Ven
369f18bbed [MIG] account_payment_order: Migration to 13.0 2021-01-05 14:03:52 +01:00
Raf Ven
001bd7e976 [IMP] account_payment_order: black, isort 2021-01-05 14:03:52 +01:00
Carlos Dauden
22390eded5 [IMP] account_payment_order: Select first partner bank 2021-01-05 14:03:52 +01:00
Guewen Baconnier
2769011d68 Add indexes on account payment models
The fields where the indexes are added are used in searches in
account_payment_order, which becomes really slow when a database have
many lines.
2021-01-05 14:03:52 +01:00
Thomas Binsfeld
703cee011d [REF] Payment Order: payment line creation from move line
Benefits of the batch creation of Odoo 12.0
The method returns the created payment lines
2021-01-05 14:03:52 +01:00
Pedro M. Baeza
04173ee973 [MIG] account_banking_sepa_direct_debit: Finish migration to 12.0
* Fixed tests
* Adjust code for Python dates handling
* Update copyrights
2021-01-05 14:03:52 +01:00
Pedro M. Baeza
e12ac64e44 [FIX] account_payment_order: Take payment mode from move (#466)
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.
2021-01-05 14:03:52 +01:00
Jordi Ballester
81152bf603 When the user looks for open payables or receivables, in the
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.
2021-01-05 14:03:52 +01:00
etobella
a73310e854 [MIG] account_payment_order 2021-01-05 14:03:52 +01:00
Adrien Peiffer (ACSONE)
4ad724855b [IMP] account_payment_order: select partner bank account automatically. 2021-01-05 14:03:52 +01:00
Alexis de Lattre
337fc2ccf0 Port almost all modules to v10 (#305)
Port almost all modules to v10

* Update to EPC Rulebook v9.2 that start to apply on 2016-11-20 (bug #300)
2021-01-05 14:03:52 +01:00
Alexis de Lattre
6f4b1f48fd [FIX] account_payment_order: 4 things:
* Fix crash when selecting a customer that has a direct debit payment mode but no mandate
* Hide many fields when payment_order_ok is False on a payment_mode
* Fix payment line communication when the move line is not linked to an invoice (problem found when porting donation_debit_debit to v9)
* For the communication field, if self.move_id.ref is False, fallback on self.move_id.name
2021-01-05 14:03:52 +01:00
Alexis de Lattre
d052cc7274 Start to port bank-payment to v9 (with a lot of improvements) during the Sorrento Code sprint 2016
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
2021-01-05 14:03:52 +01:00