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

[MIG] v16 account_banking_mandate #1016

Closed
wants to merge 118 commits into from

Conversation

gfcapalbo
Copy link
Contributor

@gfcapalbo gfcapalbo commented Jan 12, 2023

#964

Depends on #972

WIP: installs, testing now./

@gfcapalbo gfcapalbo force-pushed the 16.0-mig-account_banking_mandate branch 2 times, most recently from ba38bac to 303e993 Compare January 12, 2023 15:51
pedrobaeza and others added 27 commits January 13, 2023 10:50
* Bug OCA#96 bad use of new API
* [Usability] 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 multi-company rule on account.banking.mandate
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
The restriction rule Banking Mandate multi-company, gives an error when editing a partner bank account from a company A when that account has created a mandate from another company B. So it is impossible to create a mandate for each company without disabling the rule.
Solution: Uncheck the rule writte in Banking Mandate multi-company. But i'm not sure this is correct.
* Short headers
* Bump version numbers
* es translations
* Add creditor identifier field to report mandate.
* Translate.
* Split basic and sepa mandate
* Use api.multi instead
* Make format field required
Port almost all modules to v10

* Update to EPC Rulebook v9.2 that start to apply on 2016-11-20 (bug OCA#300)
…ovided

Using same method as in upstream, mandate is filled on invoice creation if no
one is provided. This way, we don't need to install account_banking_mandate_sale
if we don't want to handle several mandates at sales level.
…date + Add valid_mandate field and fix onchange

(cherry picked from commit 25d2e4d)
* Fix tests due to upstream change

  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
* Avoid errors in tests when run with other modules
* More adaptations to make tests to work properly

  All these problems comes from using demo data.
OCA-git-bot and others added 24 commits January 13, 2023 10:50
Currently translated at 79.6% (86 of 108 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_banking_mandate
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_banking_mandate/fr_FR/
Currently translated at 75.2% (76 of 101 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_banking_mandate
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_banking_mandate/nl/
Currently translated at 77.2% (78 of 101 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_banking_mandate
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_banking_mandate/nl/
Currently translated at 87.1% (88 of 101 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_banking_mandate
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_banking_mandate/nl/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: bank-payment-14.0/bank-payment-14.0-account_banking_mandate
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_banking_mandate/es_AR/
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)
Currently translated at 100.0% (109 of 109 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_banking_mandate
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_banking_mandate/ca/
Currently translated at 78.8% (86 of 109 strings)

Translation: bank-payment-15.0/bank-payment-15.0-account_banking_mandate
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-15-0/bank-payment-15-0-account_banking_mandate/it/
Currently translated at 78.8% (86 of 109 strings)

Translation: bank-payment-15.0/bank-payment-15.0-account_banking_mandate
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-15-0/bank-payment-15-0-account_banking_mandate/it/
Currently translated at 78.8% (86 of 109 strings)

Translation: bank-payment-15.0/bank-payment-15.0-account_banking_mandate
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-15-0/bank-payment-15-0-account_banking_mandate/it/
Currently translated at 78.8% (86 of 109 strings)

Translation: bank-payment-15.0/bank-payment-15.0-account_banking_mandate
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-15-0/bank-payment-15-0-account_banking_mandate/it/
@gfcapalbo gfcapalbo force-pushed the 16.0-mig-account_banking_mandate branch from 303e993 to ba966e3 Compare January 13, 2023 09:55
Comment on lines +1 to +23
# Copyright 2014 Compassion CH - Cyril Sester <[email protected]>
# Copyright 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# Copyright 2015-16 Akretion - Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo import api, fields, models


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

mandate_id = fields.Many2one(
comodel_name="account.banking.mandate",
string="Direct Debit Mandate",
related="payment_line_ids.mandate_id",
check_company=True,
)

@api.model
def same_fields_payment_line_and_bank_payment_line(self):
res = super().same_fields_payment_line_and_bank_payment_line()
res.append("mandate_id")
return res
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 2014 Compassion CH - Cyril Sester <[email protected]>
# Copyright 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# Copyright 2015-16 Akretion - Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class BankPaymentLine(models.Model):
_inherit = "bank.payment.line"
mandate_id = fields.Many2one(
comodel_name="account.banking.mandate",
string="Direct Debit Mandate",
related="payment_line_ids.mandate_id",
check_company=True,
)
@api.model
def same_fields_payment_line_and_bank_payment_line(self):
res = super().same_fields_payment_line_and_bank_payment_line()
res.append("mandate_id")
return res

In this PR #972, you remove this model

@pedrobaeza
Copy link
Member

Superseded by #1028

@pedrobaeza pedrobaeza closed this Mar 8, 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.