Commit Graph

415 Commits

Author SHA1 Message Date
OCA-git-bot
2fabbf9bdf [ADD] setup.py 2023-03-04 20:24:56 +00:00
OCA-git-bot
eae61b85eb [UPD] README.rst 2023-03-04 20:24:55 +00:00
OCA-git-bot
7ec3686d43 [UPD] addons table in README.md 2023-03-04 20:24:54 +00:00
oca-ci
c152526206 [UPD] Update account_payment_order.pot 2023-03-04 20:22:12 +00:00
OCA-git-bot
f3683bb85e Merge PR #1056 into 16.0
Signed-off-by pedrobaeza
2023-03-04 20:19:26 +00:00
Wolfgang Pichler
0c98de15fa [MIG] account_payment_order: Migration to 16.0 2023-03-04 20:54:01 +01:00
Wolfgang Pichler
170117c1e9 [I18N] account_payment_order: Better translations for de_DE 2023-03-04 20:54:01 +01:00
Pedro M. Baeza
0466d31c3e [FIX] account_payment_order: Do correctly the fix on tests
Previous patch by Alexis created a co-dependency between
account_payment_order and account_banking_sepa_direct_debit, which is
not correct.

This patch avoids such problem and fix properly the test, although
the utility of some of them is debatible.
2023-03-04 19:44:00 +01:00
Pedro M. Baeza
05c6c0111f [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
2023-03-04 19:44:00 +01:00
Alexis de Lattre
6eb7ad01e3 [IMP] account_payment_order: add link to payment order in chatter 2023-03-04 19:44:00 +01:00
Bert Driehuis
021cd1e1aa [FIX] account_payment_order: Fallback to payment_ref if ref is undefined 2023-03-04 19:44:00 +01:00
Denis Roussel
f3eca92554 [IMP] account_payment_order: Better communication field management
- Add a hook method to retrieve communication type and communication
- 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.
- Remove not needed assert as parameter is required
- Use the 'payment_reference' field if filled in
- 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
- Don't duplicate communication reference
2023-03-04 19:44:00 +01:00
Pedro M. Baeza
6a2621694b [FIX] account_payment_order: Proper indentation for test + make it work
The test introduced in 7bdb286aa1 is not
valid, as its indentation made it to not be executed. Anyways, the
content and the tested things are also not correct.
2023-03-04 19:44:00 +01:00
Carlos Lopez
ab739d0e62 [IMP] account_payment_order: outbound inheritable + SavepointCase
This commit split the tests for outbound payment in a base inheritable class that
can be reused in other dependant modules, and the test of this module.

similar to 86bd1a2525
2023-03-04 19:44:00 +01:00
Danny W. Adair
60a7abac56 Add pre_init_hook to add computed column
Add partner_bank_id column to avoid MemoryError on an existing Odoo
instance with lots of data.

partner_bank_id on account.move.line requires payment_order_ok to be True
which it won't be as it's newly introduced - again nothing to compute.
(see AccountMoveLine._compute_partner_bank_id() in models/account_move_line.py)
2023-03-04 19:44:00 +01:00
Antony Herrera
610cd5e4f7 [FIX] account_payment_order: Error in Batch Payments when deleting a Batch Content line 2023-03-04 19:44:00 +01:00
manu
8dd5a31124 [IMP]account_payment_order: Add activities to account.payment.order model 2023-03-04 19:44:00 +01:00
Adrien Peiffer
38c56c5c61 [FIX] Restore payment order number in account move line label. 2023-03-04 19:44:00 +01:00
Alexis de Lattre
b0b48a204d [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.
2023-03-04 19:44:00 +01:00
David Ramia
72554d709a [FIX] account_payment_order: Fix tests
Some tests need to be run on post-install
The bank_journal.inbound_payment_order_only field is true only if all inbound_payment_method_ids are payment_order_only True. For this we must include the "SEPA Direct Debit for customers" in test
2023-03-04 19:44:00 +01:00
Pedro M. Baeza
617ccccac8 [FIX] account_payment_order: Don't fail due to tz
When the test hour is around midnight, and demo data using CET/CEST
timezones, current code fails due to some asserts not having this into
consideration. This fix avoids such problem, and irons the execution
no matter the hour.
2023-03-04 19:44:00 +01:00
Enric Tobella
7aa0dab42c [IMP] account_payment_order: Promote to Mature 2023-03-04 19:44:00 +01:00
juliap98
ccea21958e Translated using Weblate (Catalan)
Currently translated at 100.0% (212 of 212 strings)

Translation: bank-payment-15.0/bank-payment-15.0-account_payment_order
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-15-0/bank-payment-15-0-account_payment_order/ca/
2023-03-04 19:44:00 +01:00
Miquel Raïch
62ca0b90f8 [IMP] account_payment_order: don't requiere reference_type anymore 2023-03-04 19:44:00 +01:00
Alexis de Lattre
7e7ebe1c75 account_payment_order: communication required in form view 2023-03-04 19:44:00 +01:00
Marçal Isern
ad9f376b29 [MIG] account_payment_order: Migration to 15.0 2023-03-04 19:44:00 +01:00
Simon S
ed5c2d0c3f Added translation using Weblate (Swedish)
Currently translated at 65.0% (138 of 212 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_payment_order
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_payment_order/sv/
2023-03-04 19:44:00 +01:00
Ignacio Buioli
b19620f8bf Translated using Weblate (Spanish (Argentina))
Currently translated at 100.0% (212 of 212 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_payment_order
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_payment_order/es_AR/
2023-03-04 19:44:00 +01:00
Alexis de Lattre
dc8dd37f0e [IMP] account_payment_order: computation of sepa + remove done state + UI adjustments
- 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
- 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.
- add optional="hide" on payment mode in invoice tree view
- FIX crash when communication=null on payment line
- payment_mode_id readonly when state != draft
2023-03-04 19:44:00 +01:00
João Marques
c7239bbc22 [FIX] account_payment_order: Fix multi-company issues in tests
Use base `account` tests from Odoo to avoid issues with the environment.
2023-03-04 19:44:00 +01:00
Miracle Ayodele
8670398081 [FIX] account_payment_order: Bind report to model 2023-03-04 19:44:00 +01:00
AmmarOfficewalaSerpentCS
a597822f2c [IMP] account_payment_order: Add hook method for finding previous payment orders + Pass single move in a get_account_payment_domain mehtod to find move in a method. 2023-03-04 19:43:51 +01:00
manu
d49f95cb95 [IMP]account_payment_order: payment date when adding transaction line 2023-03-04 19:43:51 +01:00
João Marques
5bf4b9bda5 [FIX] account_payment_order: Change security group category + Make post move field invisible in payment modes + fix account move views
- Change security group category
  Before this change, the group was creating a new section in each user's settings called "Other" with a field called "Other Extra Rights" that could select "Accounting / Payments" as an option
  This places it in the correct location
  TT29182
- Make post move field invisible in payment modes
  When the generate_moves option is not selected, the post_move option should not be available
  TT29182
- fix account move views
  Current spec was causing weird display in account move view, both for customer invoices and vendor bills
  Changing the placement and adding back the label fixes the issue
  TT29027
2023-03-04 19:42:52 +01:00
Benoit Aimont
3c11cf2aab [13.0][IMP] account_payment_order - move date should be bank line date when offsetting_account is bank_account 2023-03-04 19:42:52 +01:00
Pedro M. Baeza
35fb316970 [FIX] account_payment_order: Remove old migration scripts 2023-03-04 19:42:52 +01:00
Bosd
1d89410811 Translated using Weblate (Dutch)
Currently translated at 70.4% (155 of 220 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_payment_order
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_payment_order/nl/
2023-03-04 19:42:52 +01:00
Nelson Ramírez Sánchez
a442a6a9fb Translated using Weblate (Spanish)
Currently translated at 100.0% (221 of 221 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_payment_order
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_payment_order/es/
2023-03-04 19:42:52 +01:00
Nelson Ramírez Sánchez
cce73c2dce Added translation using Weblate (Spanish (Chile))
Currently translated at 100.0% (221 of 221 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_payment_order
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_payment_order/es_CL/
2023-03-04 19:42:52 +01:00
Pedro M. Baeza
320be4a4c7 [FIX] account_payment_order: Computed non-stored fields needs always a value
We should assign a value for all records of the set.
2023-03-04 19:42:52 +01:00
Yves Le Doeuff
6edd62d171 Translated using Weblate (French (France))
Currently translated at 91.4% (202 of 221 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_payment_order
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_payment_order/fr_FR/
2023-03-04 19:42:52 +01:00
João Marques
e2401a13a3 [FIX] account_payment_order: Fix tests
After fcaa54939e, we need to specify the invoice date for vendor bills to be able to post it
2023-03-04 19:42:52 +01:00
Yves Le Doeuff
e30330b5cb Added translation using Weblate (French (France))
Currently translated at 86.8% (192 of 221 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_payment_order
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_payment_order/fr_FR/
2023-03-04 19:42:47 +01:00
João Marques
735fcfbee4 [FIX] account_payment_order: Fix tests
On multi-company settings, we need to make sure we are searching and creating objects with the correct company associated.

TT28423
2023-03-04 19:42:47 +01:00
Carlos Roca
16274598ac [MIG] account_payment_order: Migration to v14 2023-03-04 19:42:47 +01:00
Jesús Alan Ramos Rodríguez
c65a93af5b [MIG] account_payment_order: Migration to 14.0 2023-03-04 19:42:47 +01:00
Andrea
28a35012b0 [FIX] avoid cache miss in compute 2023-03-04 19:42:47 +01:00
Ignacio Buioli
0d2341a9c4 Added translation using Weblate (Spanish (Argentina))
Currently translated at 100.0% (220 of 220 strings)

Translation: bank-payment-13.0/bank-payment-13.0-account_payment_order
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-13-0/bank-payment-13-0-account_payment_order/es_AR/
2023-03-04 19:42:47 +01:00
Luc De Meyer
98bf9b4c0c [IMP] account_payment_order: move payment order menus 2023-03-04 19:42:28 +01:00
Alexis de Lattre
bed10e155d Fix state condition on invoice view 2023-03-04 19:42:28 +01:00