Skip to content

Commit 4db716b

Browse files
[FIX] edi_queue_oca: set handler models in test to match cron domain filter
1 parent a9114c8 commit 4db716b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

edi_queue_oca/tests/test_backend_output_jobs.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
55

66

7+
from odoo.orm.model_classes import add_to_registry
78
from odoo.tests import tagged
89

910
from odoo.addons.edi_core_oca.tests.common import EDIBackendCommonTestCase
@@ -12,6 +13,21 @@
1213

1314
@tagged("-at_install", "post_install")
1415
class EDIBackendTestOutputJobsCase(EDIBackendCommonTestCase):
16+
@classmethod
17+
def _setup_records(cls):
18+
super()._setup_records()
19+
from odoo.addons.edi_core_oca.tests.fake_models import EdiTestExecution
20+
21+
add_to_registry(cls.registry, EdiTestExecution)
22+
cls.registry._setup_models__(cls.env.cr, ["edi.framework.test.execution"])
23+
cls.registry.init_models(
24+
cls.env.cr, ["edi.framework.test.execution"], {"models_to_check": True}
25+
)
26+
cls.addClassCleanup(cls.registry.__delitem__, "edi.framework.test.execution")
27+
model = cls.env["ir.model"]._get("edi.framework.test.execution")
28+
cls.exchange_type_out.generate_model_id = model
29+
cls.exchange_type_out.send_model_id = model
30+
1531
@classmethod
1632
def setUpClass(cls):
1733
super().setUpClass()

0 commit comments

Comments
 (0)