Commit Graph

85 Commits

Author SHA1 Message Date
Alexis de Lattre
f64f2af001 Add warning when payment order is not SEPA
The field 'sepa' on account.payment.order is only display for SEPA
payment methods.
If the option "show warning if not SEPA" is enabled on the payment
method, a warning banner is now displayed on payment orders with a SEPA
payment method which are not SEPA.
2024-09-13 10:21:03 +02:00
David
a081876119 [FIX] account_payment_order: out of index date
If we had a payment order with no lines we'll be getting an index error.
Better to avoid it having an empty recordset.
2024-07-16 13:26:23 +02:00
Víctor Martínez
d86fc270f7 [IMP] account_payment_order*: Define the correct date in the files that are generated.
Compatibility with https://github.com/OCA/bank-payment/pull/1305

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
2024-07-08 17:08:38 +02:00
Víctor Martínez
1724c83d3a [IMP] account_payment_order: Add Transfer moves dates
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
2024-07-01 09:15:16 +02:00
Víctor Martínez
d271494155 [FIX] account_payment_order: always return a string in the _get_payment_order_communication 2024-06-07 03:22:27 -03:00
Víctor Martínez
7ec6508724 [FIX] account_payment_order: Prevent duplicates archived bank accounts
TT47789
2024-02-28 09:56:11 +01:00
Víctor Martínez
5c66dd0ed9 [IMP] account_payment_order: Display a message with the archived bank accounts
TT47789
2024-02-19 08:40:42 +01:00
OCA-git-bot
636bb2baea Merge PR #1164 into 14.0
Signed-off-by alexis-via
2023-11-06 10:57:12 +00:00
Luc De Meyer
ec143f554e [FIX] payment order: fix compute_partner_bank_id
Fix _compute_partner_bank_id on account.move.line.
The bank account number of then invoice was not selected when a supplier has
multiple bank account numbers and there is no payment mode set on the
vendor bill. This PR corrects this issue.
2023-11-05 16:20:19 +01:00
Luc De Meyer
b2039878a8 [IMP]grouped invoices: " - ".join in stead of "-".join 2023-11-04 16:41:50 +01:00
OCA-git-bot
2e296ce88d Merge PR #1038 into 14.0
Signed-off-by pedrobaeza
2023-10-30 07:40:52 +00:00
Víctor Martínez
3699c7185c [FIX] account_payment_order: Define the value of the communication field correctly
- Purchases: Ref field from invoice always.
- Sales: Payment_ref or ref field from invoice.

TT45153
2023-09-22 10:07:05 +02:00
Carlos Lopez
d330e8573b [FIX] account_payment_order: change result_payorder_ids to list to show action correctly 2023-09-04 08:55:53 +02:00
Ethan Hildick
b7e7383d9a [FIX] account_payment_order: incorrect inbound partial reconciliations
- Also added float_compare to avoid possible rounding issues
2023-07-25 18:01:31 +02:00
Danny W. Adair
00d9e89f3d [FIX] account_payment_order: Grouped partial reconcile
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.
2023-06-04 10:40:43 +12:00
Ethan Hildick
41624fa80d [IMP] account_payment_order: Allow fixed date in the past 2023-04-24 08:52:12 +02:00
Simon Gonzalez
6d8b6825ff [IMP] account_payment_order: Concatenate all UserError messages
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.
2023-02-17 08:22:13 +01:00
Pedro M. Baeza
d0f8530b7e [FIX] account_payment_order: Remove leftover options
They are ignored since #979, and there can't be equivalent.
2023-01-05 15:52:26 +01:00
Pedro M. Baeza
fbcf02fb85 [OU-ADD] account_payment_order: Migration scripts to native payment ref
This adapts the old bank.payment.line records to account.payment records
according the new approach.
2023-01-01 17:45:02 +01:00
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
Alexis de Lattre
a0cec2ad66 [IMP] account_payment_order: add link to payment order in chatter 2022-11-08 11:31:20 +01:00
manu
e5bcbb4842 [IMP]account_payment_order: Add activities to account.payment.order model 2022-10-24 17:24:36 +02:00
Adrien Peiffer
c12fe2ba46 [FIX] Restore payment order number in account move line label. 2022-09-26 11:21:17 +02:00
OCA-git-bot
c0f2f29ecd Merge PR #936 into 14.0
Signed-off-by pedrobaeza
2022-09-05 00:01:57 +00:00
Alexis de Lattre
a861023e01 [FIX] account_payment_order: fix action returned by create_account_payment_line()
create_account_payment_line() is supposed to returned a form view for a
single payment order and a tree view for multiple payment orders. Before
this fix, it would return a tree view if you were payment more than 1
invoices while generating a single payment order, because the list
result_payorder_ids would contain several time the same ID.
2022-08-10 21:48:13 +02: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
Alexis de Lattre
46d94511c9 account_payment_order: communication required in form view 2022-02-16 09:52:33 +01:00
Alexis de Lattre
e3b7c097a0 account_payment_order: payment_mode_id readonly when state != draft 2021-10-28 00:11:34 +02:00
Alexis de Lattre
ee56b631e4 FIX crash when communication=null on payment line 2021-10-28 00:11:34 +02:00
Alexis de Lattre
7fa38049be account_payment_order: remove done state (migration script provided)
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.
2021-10-28 00:11:34 +02:00
Alexis de Lattre
cbe1eed5ac Improve computation of sepa on account.payment.order: check IBAN is in SEPA zone
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
2021-10-28 00:11:12 +02:00
OCA-git-bot
9c73d05320 Merge PR #821 into 14.0
Signed-off-by pedrobaeza
2021-07-26 11:40:23 +00:00
AmmarOfficewalaSerpentCS
9e4fb17954 [IMP] account_payment_order: Pass single move in a get_account_payment_domain mehtod to find move in a method. 2021-07-09 13:49:35 +05:30
AmmarOfficewalaSerpentCS
1f4e943129 [IMP] account_payment_order: Add hook method for finding previous payment orders 2021-07-06 15:23:15 +05:30
manu
7bdb286aa1 [IMP]account_payment_order: payment date when adding transaction line 2021-06-02 15:58:42 +02:00
Benoit Aimont
1bf42d17a0 [13.0][IMP] account_payment_order - move date should be bank line date when offsetting_account is bank_account 2021-05-12 12:40:11 +02:00
Pedro M. Baeza
5ce95f4a84 [FIX] account_payment_order: Computed non-stored fields needs always a value
We should assign a value for all records of the set.
2021-04-15 20:43:30 +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