Skip to content

Commit e039976

Browse files
committed
edi_webservice_oca: fix README
1 parent b1a9b7f commit e039976

File tree

3 files changed

+83
-12
lines changed

3 files changed

+83
-12
lines changed

edi_webservice_oca/README.rst

+39-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ EDI WebService
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:e3c80bfc8c2e03579682be217715bbd2d93504d9d2cda9770e0e8eae2c2de605
10+
!! source digest: sha256:84f4a9839ab2f338128c71358484eb5a37f372aa58e5d06c925aa41908f7fcd6
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -36,6 +36,44 @@ Allows to configure attach webservices on an EDI backend and/or on an exchange t
3636
.. contents::
3737
:local:
3838

39+
Configuration
40+
=============
41+
42+
Go to "EDI -> Config -> Backends" and edit or create one.
43+
Find the tab "Webservice" and add a webservice.
44+
On the webservice record you can specify all the general parameters to connect to the service
45+
(see `webservice` README for more details).
46+
47+
If you want to take full control on if/how the webservice is used
48+
you can do it via exchange type's advanced settings.
49+
50+
Hence, assuming your webservice has a URL configured as `https://my.endpoint/{path}`::
51+
52+
components:
53+
send:
54+
usage: webservice.send # or any custom component usage inheriting from this
55+
work_ctx:
56+
webservice:
57+
method: post # mandatory
58+
url_params:
59+
path: endpoint1/foo
60+
61+
62+
For each call related to this type, you'll get a POST request against
63+
`https://my.endpoint/endpoint/foo`.
64+
65+
``url_params`` can contain all the keys need for URL interpolation.
66+
67+
In addition, you can user ``url`` to override the full url used for the call
68+
per exchange type.
69+
70+
If you want to send data as bytes you can use the option `send_as_bytes` like::
71+
72+
[...]
73+
webservice:
74+
send_as_bytes: true
75+
[...]
76+
3977
Bug Tracker
4078
===========
4179

edi_webservice_oca/static/description/index.html

+44-11
Original file line numberDiff line numberDiff line change
@@ -367,49 +367,82 @@ <h1 class="title">EDI WebService</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370-
!! source digest: sha256:e3c80bfc8c2e03579682be217715bbd2d93504d9d2cda9770e0e8eae2c2de605
370+
!! source digest: sha256:84f4a9839ab2f338128c71358484eb5a37f372aa58e5d06c925aa41908f7fcd6
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372372
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/edi/tree/15.0/edi_webservice_oca"><img alt="OCA/edi" src="https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/edi-15-0/edi-15-0-edi_webservice_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/edi&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>Plug <cite>webservice</cite> module within EDI framework.
374374
Allows to configure attach webservices on an EDI backend and/or on an exchange type.</p>
375375
<p><strong>Table of contents</strong></p>
376376
<div class="contents local topic" id="contents">
377377
<ul class="simple">
378-
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
379-
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
380-
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
381-
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
382-
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
378+
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
379+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
380+
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
381+
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
382+
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
383+
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
383384
</ul>
384385
</li>
385386
</ul>
386387
</div>
388+
<div class="section" id="configuration">
389+
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
390+
<p>Go to “EDI -&gt; Config -&gt; Backends” and edit or create one.
391+
Find the tab “Webservice” and add a webservice.
392+
On the webservice record you can specify all the general parameters to connect to the service
393+
(see <cite>webservice</cite> README for more details).</p>
394+
<p>If you want to take full control on if/how the webservice is used
395+
you can do it via exchange type’s advanced settings.</p>
396+
<p>Hence, assuming your webservice has a URL configured as <cite>https://my.endpoint/{path}</cite>:</p>
397+
<pre class="literal-block">
398+
components:
399+
send:
400+
usage: webservice.send # or any custom component usage inheriting from this
401+
work_ctx:
402+
webservice:
403+
method: post # mandatory
404+
url_params:
405+
path: endpoint1/foo
406+
</pre>
407+
<p>For each call related to this type, you’ll get a POST request against
408+
<cite>https://my.endpoint/endpoint/foo</cite>.</p>
409+
<p><tt class="docutils literal">url_params</tt> can contain all the keys need for URL interpolation.</p>
410+
<p>In addition, you can user <tt class="docutils literal">url</tt> to override the full url used for the call
411+
per exchange type.</p>
412+
<p>If you want to send data as bytes you can use the option <cite>send_as_bytes</cite> like:</p>
413+
<pre class="literal-block">
414+
[...]
415+
webservice:
416+
send_as_bytes: true
417+
[...]
418+
</pre>
419+
</div>
387420
<div class="section" id="bug-tracker">
388-
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
421+
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
389422
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/edi/issues">GitHub Issues</a>.
390423
In case of trouble, please check there if your issue has already been reported.
391424
If you spotted it first, help us to smash it by providing a detailed and welcomed
392425
<a class="reference external" href="https://github.com/OCA/edi/issues/new?body=module:%20edi_webservice_oca%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
393426
<p>Do not contact contributors directly about support or help with technical issues.</p>
394427
</div>
395428
<div class="section" id="credits">
396-
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
429+
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
397430
<div class="section" id="authors">
398-
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
431+
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
399432
<ul class="simple">
400433
<li>Creu Blanca</li>
401434
<li>Camptocamp</li>
402435
</ul>
403436
</div>
404437
<div class="section" id="contributors">
405-
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
438+
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
406439
<ul class="simple">
407440
<li>Enric Tobella &lt;<a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a>&gt;</li>
408441
<li>Simone Orsi &lt;<a class="reference external" href="mailto:simone.orsi&#64;camptocamp.com">simone.orsi&#64;camptocamp.com</a>&gt;</li>
409442
</ul>
410443
</div>
411444
<div class="section" id="maintainers">
412-
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
445+
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
413446
<p>This module is maintained by the OCA.</p>
414447
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
415448
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose

0 commit comments

Comments
 (0)