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 Nov 29, 2024
1 parent 5050cf4 commit 3191217
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 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
4 changes: 2 additions & 2 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 @@ -57,6 +57,6 @@ def set_payment_modes_on_partner(self):

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

Check warning on line 62 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-L62

Added lines #L60 - L62 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

0 comments on commit 3191217

Please sign in to comment.