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

16.0 mig account banking sepa direct debit #1019

Closed

Conversation

gfcapalbo
Copy link
Contributor

#964

WIP : testing, migrated

Alexis de Lattre and others added 30 commits January 13, 2023 11:21
….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'
oca-travis and others added 24 commits January 13, 2023 11:21
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: bank-payment-14.0/bank-payment-14.0-account_banking_sepa_direct_debit
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_banking_sepa_direct_debit/es_AR/
Currently translated at 89.6% (69 of 77 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_banking_sepa_direct_debit
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_banking_sepa_direct_debit/nl/
Currently translated at 92.2% (71 of 77 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_banking_sepa_direct_debit
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_banking_sepa_direct_debit/nl/
Fix bug in account_banking_mandate when a res.partner.bank is not attached to a particular company (company_id is NOT required on res.partner.bank)
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: bank-payment-14.0/bank-payment-14.0-account_banking_sepa_direct_debit
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_banking_sepa_direct_debit/es_AR/
…uld not be required

The bank account is taken from the mandate. Mandate is autopopulated if not found.
sepa_credit_transfer: bank_account_required back to True
Partial revert of the breakage of PR OCA#875
…, account_banking_direct_debit: Remove Environment.manage()

Environment.manage() is deprecated in v 15.0
Comment on lines +1 to +20
# Copyright 2020 Akretion - Alexis de Lattre
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo import models


class BankPaymentLine(models.Model):
_inherit = "bank.payment.line"

def move_line_offsetting_account_hashcode(self):
"""
From my experience, even when you ask several direct debits
at the same date with enough delay, you will have several credits
on your bank statement: one for each mandate types.
So we split the transfer move lines by mandate type, so easier
reconciliation of the bank statement.
"""
hashcode = super().move_line_offsetting_account_hashcode()
hashcode += "-" + str(self.mandate_id.recurrent_sequence_type)
return hashcode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copyright 2020 Akretion - Alexis de Lattre
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models
class BankPaymentLine(models.Model):
_inherit = "bank.payment.line"
def move_line_offsetting_account_hashcode(self):
"""
From my experience, even when you ask several direct debits
at the same date with enough delay, you will have several credits
on your bank statement: one for each mandate types.
So we split the transfer move lines by mandate type, so easier
reconciliation of the bank statement.
"""
hashcode = super().move_line_offsetting_account_hashcode()
hashcode += "-" + str(self.mandate_id.recurrent_sequence_type)
return hashcode

In this PR #972, this model was removed

lines_per_group = {}
# key = (requested_date, priority, sequence type)
# value = list of lines as objects
for line in self.bank_line_ids:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field does not exist due to the fact that the module bank.payment.line was deleted. Please, change it

@Reyes4711-S73
Copy link
Contributor

Functional review incorrect. There are some errors.
@pedrobaeza

@gfcapalbo
Copy link
Contributor Author

@Reyes4711-S73 thanks for the review, will be checking your branch.

@gfcapalbo gfcapalbo closed this Apr 5, 2023
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.