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

[FIX] sale_advance_payment: post_init tag #8

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sale_advance_payment/tests/test_sale_advance_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

from odoo import fields
from odoo.exceptions import ValidationError
from odoo.tests import common
from odoo.tests import common, tagged


@tagged("post_install", "-at_install")
class TestSaleAdvancePayment(common.TransactionCase):
@classmethod
def setUpClass(cls):
Expand Down Expand Up @@ -81,8 +82,8 @@
)
# active euro currency if inactive for test
if not cls.currency_euro.active:
cls.currency_euro.active = True
cls.active_euro = True

Check warning on line 86 in sale_advance_payment/tests/test_sale_advance_payment.py

View check run for this annotation

Codecov / codecov/patch

sale_advance_payment/tests/test_sale_advance_payment.py#L85-L86

Added lines #L85 - L86 were not covered by tests
cls.currency_usd = cls.env["res.currency"].search([("name", "=", "USD")])
cls.currency_rate = cls.env["res.currency.rate"].search(
[
Expand All @@ -91,7 +92,7 @@
]
)
if cls.currency_rate:
cls.currency_rate.write({"rate": 1.20})

Check warning on line 95 in sale_advance_payment/tests/test_sale_advance_payment.py

View check run for this annotation

Codecov / codecov/patch

sale_advance_payment/tests/test_sale_advance_payment.py#L95

Added line #L95 was not covered by tests
else:
cls.currency_rate = cls.env["res.currency.rate"].create(
{
Expand Down Expand Up @@ -167,7 +168,7 @@
}
)
)
advance_payment_0.make_advance_payment()

Check warning on line 171 in sale_advance_payment/tests/test_sale_advance_payment.py

View check run for this annotation

Codecov / codecov/patch

sale_advance_payment/tests/test_sale_advance_payment.py#L171

Added line #L171 was not covered by tests

# Create Advance Payment 1 - EUR - bank
advance_payment_1 = (
Expand Down Expand Up @@ -253,7 +254,7 @@
}
)
)
advance_payment_5.make_advance_payment()

Check warning on line 257 in sale_advance_payment/tests/test_sale_advance_payment.py

View check run for this annotation

Codecov / codecov/patch

sale_advance_payment/tests/test_sale_advance_payment.py#L257

Added line #L257 was not covered by tests

# Confirm Sale Order
self.sale_order_1.action_confirm()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from unittest.mock import patch

from odoo.tests import tagged

from odoo.addons.account.models.account_payment_method import AccountPaymentMethod
from odoo.addons.sale_automatic_workflow.tests.common import (
TestAutomaticWorkflowMixin,
TestCommon,
)


@tagged("post_install", "-at_install")
class TestAutomaticWorkflowPaymentMode(TestCommon, TestAutomaticWorkflowMixin):
@classmethod
def setUpClass(cls):
Expand Down
Loading