Skip to content

Commit

Permalink
[FIX] account_invoice_section_sale_order: fix test-case test_create_i…
Browse files Browse the repository at this point in the history
…nvoice_with_currency
  • Loading branch information
Lukas Tran committed Feb 4, 2025
1 parent a84d234 commit c62dfd9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions account_invoice_section_sale_order/tests/common.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from odoo.tests import tagged
from odoo.tests.common import SavepointCase
from odoo.tests.common import TransactionCase


@tagged("-at_install", "post_install")
class Common(SavepointCase):
class Common(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ def test_create_invoice(self):
"".join([self.order1_p1.name, " - ", self.order1_p1.client_order_ref]),
"line_section",
),
20: ("order 1 line 1", False),
30: ("order 1 line 2", False),
20: ("order 1 line 1", "product"),
30: ("order 1 line 2", "product"),
40: (self.order2_p1.name, "line_section"),
50: ("order 2 line 1", False),
60: ("order 2 line 2", False),
50: ("order 2 line 1", "product"),
60: ("order 2 line 2", "product"),
}
invoice_ids = (self.order1_p1 + self.order2_p1)._create_invoices()
lines = invoice_ids[0].invoice_line_ids.sorted("sequence")
Expand Down Expand Up @@ -98,13 +98,13 @@ def test_custom_grouping_by_sale_order_user(self):
invoice = (orders + sale_order_3)._create_invoices()
result = {
10: ("Mocked value from ResUsers", "line_section"),
20: ("order 1 line 1", False),
30: ("order 1 line 2", False),
40: ("order 2 line 1", False),
50: ("order 2 line 2", False),
20: ("order 1 line 1", "product"),
30: ("order 1 line 2", "product"),
40: ("order 2 line 1", "product"),
50: ("order 2 line 2", "product"),
60: ("Mocked value from ResUsers", "line_section"),
70: ("order 3 line 1", False),
80: ("order 3 line 2", False),
70: ("order 3 line 1", "product"),
80: ("order 3 line 2", "product"),
}
for line in invoice.invoice_line_ids.sorted("sequence"):
if line.sequence not in result:
Expand Down

0 comments on commit c62dfd9

Please sign in to comment.