Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] account_banking_sepa_direct_debit #1406

Draft
wants to merge 100 commits into
base: 18.0
Choose a base branch
from

Conversation

alexis-via
Copy link
Contributor

No description provided.

Alexis de Lattre and others added 30 commits January 27, 2025 11:04
….001.02, pain.008.001.03 and pain.008.001.04. This module is not ready yet : the management of mandates is still missing. I am currently trying to get more information about these mandates to decide what is the best implemtation of the data model of the mandates (O2M on res.partner ? O2M os res.partner.bank ?).
* Restore scheme field in mandate view
* Uncaught flake8 errors
* Set args correctly for cron job
* Split for removing stock dependency on sale
* Remove old translations templates
* More reorder on folder structure
* Translation template files
* Translations to spanish
* Transfer move: one transfer move for each payment.order with only 1 line in the transfer account for the total of the account move. Move the inherit of the 'Invoice' button of payment.order from account_banking_payment_transfer to account_banking_payment_export Demo data: Add a bank account + mandate on Agrolait, to be able to easily test multi-partner SEPA DD
* mandates: search by reference, add group_by, add seq type in tree view
* Add scheme in mandate tree+search view Replace tabs by spaces in mandate views account_banking_mandate/views/account_banking_mandate_view.xml: convert from dos to unix format
* Add sale_ok and purchase_ok filters in partner/sale/purchase form views Use widget=selection for payment_mode_id fields Update demo data
* Limit lenght of mandate reference, according to ISO 20022
Fix an important regression in account_banking_sepa_direct_debit: "Date of Last Debit" was not set any more
Proper write of date_done with account_banking_payment_export is installed without account_banking_payment_transfer
Add post-install script for date_sent on payment.order
…ion when there is more than one line with the same mandate.
* Add bank.payment.lines object to allow grouping in the payments
* Add a hook to inherit grouping of the transfer account move line

  Use that new hook in SEPA direct debits
  Better variable names
* FIX Reading wrong field for sequence type of SEPA DD
  Loop on bank payment lines instead of payment lines
* Update automated tests and demo data
* Add on_change on field 'type' of payment.mode for easier configuration
* Remove unused POT files
* Spanish translation
* Fix mandate report layout
Now the visibility is controlled through a security group.
…ange

Odoo has added a constraint for avoiding a company currency change if there
are move lines, making these tests to fail, as the currency is changed to EUR.

With this commit, we create a new company with EUR currency for avoiding the
problem.

This commit also changes account_banking_mandate for not duplicating mandate
number, as it was detected during the test creation.

Similar to 1f8e345
…equence_type (OCA#464)

The sequence_type of mandates switches from First to Recurring:
- BEFORE: when state switched from 'open' to 'generated'
- NOW: when state switches from 'generated' to 'uploaded'
manuelregidor and others added 30 commits January 27, 2025 11:04
[UPD] Update account_banking_sepa_direct_debit.pot

[UPD] README.rst
…, account_banking_direct_debit: Remove Environment.manage()

Environment.manage() is deprecated in v 15.0
…nt refactoring

Notable changes:

- InstrId and EndToEndId tags are now filled with the journal entry ID,
  as there's no bank payment line identifier.
From this version, Odoo already includes code on the
account.payment.method creation for adding such method to each journal:

https://github.com/odoo/odoo/blob/a93ed75cb80f16f/addons/account/models/account_payment_method.py#L24-L38

so we don't need to explicitly create them for the new payment methods
we are adding in these modules.

TT41146
…plied in reports

account_banking_sepa_direct_debit 15.0.2.1.0
Currently translated at 100.0% (77 of 77 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_banking_sepa_direct_debit
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_sepa_direct_debit/es/
Currently translated at 100.0% (77 of 77 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_banking_sepa_direct_debit
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_sepa_direct_debit/fr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: bank-payment-16.0/bank-payment-16.0-account_banking_sepa_direct_debit
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_sepa_direct_debit/
Currently translated at 100.0% (74 of 74 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_banking_sepa_direct_debit
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_sepa_direct_debit/es/
Currently translated at 100.0% (74 of 74 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_banking_sepa_direct_debit
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_sepa_direct_debit/es/
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.
NEW FEATURES
- activate 'in_payment' payment_state on invoices... at last !
- payment order numbering: add ability to have a sequence specific to a particular payment mode (optional)
- add show account number policy "first_last" to show N first and N last characters of bank account number

SMALL IMPROVEMENTS
- account.payment.method: rename field "payment_order_only" to "payment_order_ok" for naming consistency with the field of account.payment.mode. Auto-set "payment_order_ok" of payment mode from the equivalent field of payment method. Migration scripts provided for account.payment.method and the data of SEPA credit transfer and SEPA direct debit.
- payment order attachment: add M2O payment_file_id that points to the payment file. No more need for a simplified attachment form view.
- keep the spaces in the scrambled bank account number, so that the user easily understands that it is a "scrambled" bank account number
- add field acc_number_scrambled on res.partner.bank for easy and direct use of scrambled account number

SIMPLIFICATION / CODE CLEANUP
- remove field partner_bank_id on account.move.line
- move code for scrambled account number from qweb report to res.partner.bank class
- remove boolean field show_bank_account_from_journal from account.payment.mode: we now consider that this option is always true i.e. when account_payment_partner is installed, Odoo takes the bank accounts to display on the customer invoice from the payment mode (if the payment mode is empty, it displays all the bank accounts of the company). As a consequence, hide partner_bank_id on customer invoice form view.
- remove fields inbound_payment_order_only and outbound_payment_order_only from account.journal : these 2 fields were not used!
- add check_company=True where it was missing and remove code of constraint that checks company consistency
- re-organise form view of payment order to equilibrate between left column and right column

TECHNICAL:
- replace @api.onchange by computed readonly=False store=True fields
- remove (or reduce) the use of demo data in tests
- speed-up tests by using tracking_disable=True
- Replace (6, 0, []) and (0, 0, {}) by Command.set() and Command.create()
- add sql unicity constraint on payment order number per company
Harmonize values for reference_type on account.move and communication_type on account.payment.line:
2 possible values : free and structured (migration script provided)
Simplify code for reference.
Use lxml.objectify instead of lxml.etree for XML generation
Add support for currencies with decimal places != 2
Stop using safe_eval() in _prepare_field()
Add arg 'raise_if_oversized' in _prepare_field() to avoid cutting fields
that should never be cut
More robust implementation of allowed characters in _prepare_field():
filter on the allower characters instead of filtering in unallowed
characters
Don't use _prepare_field() where it is not really needed (on dates,
country code, currency code)
Remove support for pain.001.001.02: nobody uses it (pain.001.001.03 must
be used according to EPC) and it adds maintenance burden
Switch methods from public to private where relevant
Remove noqa: C901 in account_banking_sepa_credit_transfer
Add tests in account_banking_pain_base
Remove support for:
- SCT : pain.001.001.04, pain.001.001.05
- SDD : ain.008.001.03, ain.008.001.04
because these PAIN version have never been adopted by EPC.
Update and improve README
… to an IBAN account

Add python constraint to disallow the creation of a SEPA mandate linked
to a non-IBAN account. Fixes bug OCA#1337
…nt.payment.order

This new field payment_method_code on account.move and
account.payment.order is available as invisible in tree+form view: it
allows to easily show/hide fields specific to a payment method in format-specific modules.
Remove field sepa_payment_method (replaced by generic field payment_method_code)
Update field definition of payment_mode_id on account.move: precompute=True and move domain from view to field definition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.