Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 42 additions & 37 deletions edi_core_oca/views/edi_exchange_type_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,43 +72,48 @@
</group>
<notebook>
<page name="exec_handlers" string="Execution handlers">
<group
name="input_handlers"
invisible="direction != 'input'"
>
<field
name="receive_model_id"
options="{'no_create': True}"
/>
<field
name="process_model_id"
options="{'no_create': True}"
/>
<field
name="input_validate_model_id"
options="{'no_create': True}"
/>
</group>
<group
name="output_handlers"
invisible="direction != 'output'"
>
<field
name="generate_model_id"
options="{'no_create': True}"
/>
<field
name="send_model_id"
options="{'no_create': True}"
/>
<field
name="output_validate_model_id"
options="{'no_create': True}"
/>
<field
name="check_model_id"
options="{'no_create': True}"
/>
<group name="handlers_row">
<group name="handlers_left">
<field
name="receive_model_id"
invisible="direction != 'input'"
options="{'no_create': True}"
/>
<field
name="process_model_id"
invisible="direction != 'input'"
options="{'no_create': True}"
/>
<field
name="input_validate_model_id"
invisible="direction != 'input'"
options="{'no_create': True}"
/>
<field
name="generate_model_id"
invisible="direction != 'output'"
options="{'no_create': True}"
/>
<field
name="send_model_id"
invisible="direction != 'output'"
options="{'no_create': True}"
/>
<field
name="output_validate_model_id"
invisible="direction != 'output'"
options="{'no_create': True}"
/>
<field
name="check_model_id"
invisible="direction != 'output'"
options="{'no_create': True}"
/>
</group>
<!-- Extension point: handler-specific modules
(eg. edi_webservice_oca) inject their own
settings here as a right-side column. -->
<group name="handlers_right" />
</group>
</page>
<page
Expand Down
10 changes: 9 additions & 1 deletion edi_webservice_oca/components/send.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# @author: Simone Orsi <simahawk@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from requests import Response

from odoo import _, exceptions

from odoo.addons.component.core import Component
Expand All @@ -27,7 +29,13 @@ def __init__(self, work_context):

def send(self):
method, pargs, kwargs = self._get_call_params()
return self.webservice_backend.call(method, *pargs, **kwargs)
response = self.exchange_record.backend_id.webservice_backend_id.call(
method, *pargs, **kwargs
)
if not isinstance(response, Response):
# backward compat for obsolete `content_only` param
return response
return response.content

def _get_call_params(self):
try:
Expand Down
Loading