Skip to content

Commit

Permalink
[MIG] account_banking_ach_base: migration to V17
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiMForgeFlow committed Dec 19, 2024
1 parent 5050cf4 commit 3419f48
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion account_banking_ach_base/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Localizations for North American Banking & Financials",
"summary": "Add fields required for North American Banking & Financials",
"version": "16.0.1.0.1",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"author": "Thinkwell Designs, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-usa",
Expand Down
13 changes: 7 additions & 6 deletions account_banking_ach_base/models/account_banking_mandate.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def validate(self):
raise UserError(

Check warning on line 19 in account_banking_ach_base/models/account_banking_mandate.py

View check run for this annotation

Codecov / codecov/patch

account_banking_ach_base/models/account_banking_mandate.py#L19

Added line #L19 was not covered by tests
_("""Delay days must be specified, and greater than 0.""")
)
return super(AccountBankingMandate, self).validate()
return super().validate()

Check warning on line 22 in account_banking_ach_base/models/account_banking_mandate.py

View check run for this annotation

Codecov / codecov/patch

account_banking_ach_base/models/account_banking_mandate.py#L22

Added line #L22 was not covered by tests

def set_payment_modes_on_partner(self):
"""
Expand Down Expand Up @@ -55,8 +55,9 @@ def set_payment_modes_on_partner(self):
if payment_modes:
self.partner_id.write(payment_modes)

Check warning on line 56 in account_banking_ach_base/models/account_banking_mandate.py

View check run for this annotation

Codecov / codecov/patch

account_banking_ach_base/models/account_banking_mandate.py#L56

Added line #L56 was not covered by tests

@api.model
def create(self, vals):
mandate = super(AccountBankingMandate, self).create(vals)
mandate.set_payment_modes_on_partner()
return mandate
@api.model_create_multi
def create(self, vals_list):
mandates = super().create(vals_list)

Check warning on line 60 in account_banking_ach_base/models/account_banking_mandate.py

View check run for this annotation

Codecov / codecov/patch

account_banking_ach_base/models/account_banking_mandate.py#L60

Added line #L60 was not covered by tests
for mandate in mandates:
mandate.set_payment_modes_on_partner()
return mandates

Check warning on line 63 in account_banking_ach_base/models/account_banking_mandate.py

View check run for this annotation

Codecov / codecov/patch

account_banking_ach_base/models/account_banking_mandate.py#L62-L63

Added lines #L62 - L63 were not covered by tests
2 changes: 1 addition & 1 deletion account_banking_ach_base/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ def create_account_payment_line(self):
name=invoice.name,
delay_expired=delay_expired.strftime("%Y-%m-%d"),
)
return super(AccountMove, self).create_account_payment_line()
return super().create_account_payment_line()

Check warning on line 27 in account_banking_ach_base/models/account_move.py

View check run for this annotation

Codecov / codecov/patch

account_banking_ach_base/models/account_move.py#L27

Added line #L27 was not covered by tests
7 changes: 4 additions & 3 deletions account_banking_ach_base/models/account_payment_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def validate_mandates(self, line):
if line.mandate_id.state != "valid":
raise Warning(

Check warning on line 85 in account_banking_ach_base/models/account_payment_order.py

View check run for this annotation

Codecov / codecov/patch

account_banking_ach_base/models/account_payment_order.py#L85

Added line #L85 was not covered by tests
_(
"The ACH Direct Debit mandate with reference %(unique_mandate_reference)s "
"The ACH Direct Debit mandate with "
"reference %(unique_mandate_reference)s "
"for partner %(name)s has expired."
),
unique_mandate_reference=line.mandate_id.unique_mandate_reference,
Expand All @@ -93,8 +94,8 @@ def validate_mandates(self, line):
if line.mandate_id.type == "oneoff" and line.mandate_id.last_debit_date:
raise Warning(

Check warning on line 95 in account_banking_ach_base/models/account_payment_order.py

View check run for this annotation

Codecov / codecov/patch

account_banking_ach_base/models/account_payment_order.py#L95

Added line #L95 was not covered by tests
_(
"The mandate with reference %(unique_mandate_reference)s for partner "
"%(name)s has type set to 'One-Off' and it has a "
"The mandate with reference %(unique_mandate_reference)s "
"for partner %(name)s has type set to 'One-Off' and it has a "
"last debit date set to %(last_debit_date)s, so we can't use "
"it."
),
Expand Down
11 changes: 7 additions & 4 deletions account_banking_ach_base/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -420,7 +421,9 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
Expand Down

0 comments on commit 3419f48

Please sign in to comment.