Skip to content

Commit

Permalink
Merge PR #1103 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by dhongu
  • Loading branch information
OCA-git-bot committed Oct 22, 2024
2 parents e8c11d6 + 6a6fda6 commit 8c79862
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions l10n_ro_etransport/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo.modules.module import get_module_resource

# from odoo.modules.module import get_module_resource
from odoo.tools import file_path

_logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -134,9 +136,7 @@ def get_instastat_code(product):

_logger.info(xml_content)
xml_doc = etree.fromstring(xml_content.encode())
schema_file_path = get_module_resource(
"l10n_ro_etransport", "static/schemas", "eTransport.xsd"
)
schema_file_path = file_path("l10n_ro_etransport/static/schemas/eTransport.xsd")
xml_schema = etree.XMLSchema(etree.parse(open(schema_file_path)))

is_valid = xml_schema.validate(xml_doc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
import requests

from odoo.exceptions import ValidationError
from odoo.modules.module import get_module_resource
from odoo.tests import Form, tagged

# from odoo.modules.module import get_module_resource
from odoo.tools import file_path

from odoo.addons.account.tests.common import AccountTestInvoicingCommon


Expand All @@ -22,9 +24,7 @@ def setUpClass(cls, chart_template_ref="ro"):
super().setUpClass(chart_template_ref=chart_template_ref)
cls.env.company.l10n_ro_accounting = True
cls.mainpartner = cls.env["res.partner"].create({"name": "Test partner"})
test_file_path = get_module_resource(
"l10n_ro_partner_create_by_vat", "tests", "anaf_data.json"
)
test_file_path = file_path("l10n_ro_partner_create_by_vat/tests/anaf_data.json")
cls.anaf_data = json.load(open(test_file_path))
cls.mainpartner = cls.mainpartner.with_context(anaf_data=cls.anaf_data)

Expand Down

0 comments on commit 8c79862

Please sign in to comment.