Skip to content

Commit

Permalink
Merge PR #625 into 18.0
Browse files Browse the repository at this point in the history
Signed-off-by alexis-via
  • Loading branch information
OCA-git-bot committed Feb 18, 2025
2 parents 499537c + ee21d78 commit 3ab51da
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions l10n_fr_intrastat_service/tests/test_fr_intrastat_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from dateutil.relativedelta import relativedelta
from lxml import etree

from odoo import Command
from odoo.exceptions import UserError
from odoo.tests import tagged
from odoo.tools import float_compare
Expand All @@ -22,9 +23,12 @@ class TestFrIntrastatService(AccountTestInvoicingCommon):
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
all_companies = cls.env["res.company"].sudo().search([])
all_companies.write({"vat_check_vies": False})
cls.fr_test_company = cls.setup_other_company(
name="Akretion France TEST DES",
vat="FR86792377731",
vat_check_vies=False,
)
cls.company = cls.fr_test_company["company"]
cls.fp_eu_b2b = cls.env["account.fiscal.position"].create(
Expand Down Expand Up @@ -71,28 +75,24 @@ def setUpClass(cls):
"move_type": "out_invoice",
"invoice_date": date,
"invoice_line_ids": [
(
0,
0,
Command.create(
{
"product_id": cls.service_product.id,
"quantity": 5,
"price_unit": 90,
"name": "Audit service",
"account_id": cls.account_revenue.id,
},
}
),
(
0,
0,
Command.create(
{
# product
"product_id": cls.hw_product.id,
"quantity": 1,
"price_unit": 1950,
"name": "Laptop",
"account_id": cls.account_revenue.id,
},
}
),
],
}
Expand All @@ -108,28 +108,24 @@ def setUpClass(cls):
"move_type": "out_invoice",
"invoice_date": date,
"invoice_line_ids": [
(
0,
0,
Command.create(
{
"product_id": cls.env.ref("product.product_product_1").id,
"quantity": 2,
"price_unit": 90.2,
"name": "GAP Analysis for your Odoo v10 project",
"account_id": cls.account_revenue.id,
},
}
),
(
0,
0,
Command.create(
{
# consu product
"product_id": cls.env.ref("product.product_product_7").id,
"quantity": 1,
"price_unit": 45,
"name": "Apple headphones",
"account_id": cls.account_revenue.id,
},
}
),
],
}
Expand All @@ -145,16 +141,14 @@ def setUpClass(cls):
"move_type": "out_refund",
"invoice_date": date,
"invoice_line_ids": [
(
0,
0,
Command.create(
{
"product_id": cls.service_product.id,
"quantity": 1,
"price_unit": 90,
"name": "Refund consulting hour",
"account_id": cls.account_revenue.id,
},
}
)
],
}
Expand Down

0 comments on commit 3ab51da

Please sign in to comment.