diff --git a/edi_endpoint_oca/__manifest__.py b/edi_endpoint_oca/__manifest__.py index ea8259172d0..bf2a5f139c8 100644 --- a/edi_endpoint_oca/__manifest__.py +++ b/edi_endpoint_oca/__manifest__.py @@ -7,12 +7,12 @@ "summary": """ Base module allowing configuration of custom endpoints for EDI framework. """, - "version": "14.0.1.5.1", + "version": "13.0.1.0.0", "development_status": "Beta", "license": "LGPL-3", "website": "https://github.com/OCA/edi", "author": "Camptocamp,Odoo Community Association (OCA)", - "depends": ["base_edi", "edi_oca", "endpoint"], + "depends": ["edi", "endpoint"], "data": [ "data/server_action.xml", "security/ir.model.access.csv", diff --git a/edi_endpoint_oca/demo/edi_backend_demo.xml b/edi_endpoint_oca/demo/edi_backend_demo.xml index 871d0d30773..fbc30e656f2 100644 --- a/edi_endpoint_oca/demo/edi_backend_demo.xml +++ b/edi_endpoint_oca/demo/edi_backend_demo.xml @@ -2,19 +2,19 @@ EDI backend with endpoints DEMO - + EDI exchange demo demo_endpoint - + input - + EDI Demo Endpoint 1 diff --git a/edi_endpoint_oca/models/__init__.py b/edi_endpoint_oca/models/__init__.py index 8d770d06a8a..3d48d48fed5 100644 --- a/edi_endpoint_oca/models/__init__.py +++ b/edi_endpoint_oca/models/__init__.py @@ -2,4 +2,3 @@ from . import edi_backend_type from . import edi_endpoint from . import edi_exchange_record -from . import edi_exchange_consumer_mixin diff --git a/edi_endpoint_oca/models/edi_backend.py b/edi_endpoint_oca/models/edi_backend.py index c9153fe1c58..57d3d2b6a31 100644 --- a/edi_endpoint_oca/models/edi_backend.py +++ b/edi_endpoint_oca/models/edi_backend.py @@ -26,8 +26,9 @@ def _compute_endpoints_count(self): record.endpoints_count = by_backend_id.get(record.id) def action_manage_endpoints(self): - xmlid = "edi_endpoint_oca.edi_endpoint_act_window" - action = self.env["ir.actions.act_window"]._for_xml_id(xmlid) + module_name = "edi_endpoint_oca" + action_xmlid = "edi_endpoint_act_window" + action = self.env["ir.actions.act_window"].for_xml_id(module_name, action_xmlid) action["domain"] = [ ("backend_type_id", "=", self.backend_type_id.id), "|", diff --git a/edi_endpoint_oca/models/edi_endpoint.py b/edi_endpoint_oca/models/edi_endpoint.py index 70f182ad923..ad515e80a88 100644 --- a/edi_endpoint_oca/models/edi_endpoint.py +++ b/edi_endpoint_oca/models/edi_endpoint.py @@ -4,7 +4,7 @@ import werkzeug from odoo import _, api, exceptions, fields, models -from odoo.tools import safe_eval +from odoo.tools.safe_eval import safe_eval class EDIEndpoint(models.Model): @@ -70,13 +70,14 @@ def _handle_request(self, request): def action_view_edi_records(self): self.ensure_one() - xmlid = "edi_oca.act_open_edi_exchange_record_view" - action = self.env["ir.actions.act_window"]._for_xml_id(xmlid) + module_name = "edi" + action_xmlid = "act_open_edi_exchange_record_view" + action = self.env["ir.actions.act_window"].for_xml_id(module_name, action_xmlid) action["domain"] = [("edi_endpoint_id", "=", self.id)] # Purge default search filters from ctx to avoid hiding records ctx = action.get("context", {}) if isinstance(ctx, str): - ctx = safe_eval.safe_eval(ctx, self.env.context) + ctx = safe_eval(ctx, self.env.context) action["context"] = { k: v for k, v in ctx.items() if not k.startswith("search_default_") } diff --git a/edi_endpoint_oca/models/edi_exchange_consumer_mixin.py b/edi_endpoint_oca/models/edi_exchange_consumer_mixin.py deleted file mode 100644 index fe6443606fb..00000000000 --- a/edi_endpoint_oca/models/edi_exchange_consumer_mixin.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2023 Camptocamp SA -# @author Simone Orsi -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import fields, models - - -class EDIExchangeConsumerMixin(models.AbstractModel): - - _inherit = "edi.exchange.consumer.mixin" - - origin_edi_endpoint_id = fields.Many2one( - string="EDI origin endpoint", - comodel_name="edi.endpoint", - ondelete="set null", - related="origin_exchange_record_id.edi_endpoint_id", - # Store it to ease searching - store=True, - ) diff --git a/edi_endpoint_oca/views/edi_backend_views.xml b/edi_endpoint_oca/views/edi_backend_views.xml index 666cc4b08a7..42264114438 100644 --- a/edi_endpoint_oca/views/edi_backend_views.xml +++ b/edi_endpoint_oca/views/edi_backend_views.xml @@ -2,7 +2,7 @@ edi.backend - + diff --git a/edi_endpoint_oca/views/edi_endpoint_views.xml b/edi_endpoint_oca/views/edi_endpoint_views.xml index 20f9df3aaa7..2998726e177 100644 --- a/edi_endpoint_oca/views/edi_endpoint_views.xml +++ b/edi_endpoint_oca/views/edi_endpoint_views.xml @@ -93,7 +93,7 @@ EDI Endpoints - + diff --git a/edi_endpoint_oca/views/edi_exchange_record_views.xml b/edi_endpoint_oca/views/edi_exchange_record_views.xml index 18535545b77..a774e575a4c 100644 --- a/edi_endpoint_oca/views/edi_exchange_record_views.xml +++ b/edi_endpoint_oca/views/edi_exchange_record_views.xml @@ -2,7 +2,7 @@ edi.exchange.record - + @@ -12,7 +12,7 @@ edi.exchange.record - + @@ -22,7 +22,7 @@ edi.exchange.record - +