Author: |
Open2bizz |
License: |
AGPL-3 |
Branch: |
8.0 |
Repository: |
bobslee/odoo-addons |
Dependencies: |
base,
and
mail |
Languages: |
HTML (220, 5.4%),
Markdown (101, 2.5%),
PO File (220, 5.4%),
Python (2343, 57.4%),
and
XML (1196, 29.3%) |
Other branches: |
10.0,
bugfix/merge_not_working,
bugfix/orbeon_gt_2016_not_able_to_safe,
bugfix/pdf_not_working,
feature/sso,
thomaspot-patch-1,
thomaspot-patch-2,
and
wip |
Other repositories: |
alangwansui/odoo-addons,
dochse/odoo-addons,
hxsam/odoo-addons,
jason156/odoo-addons-2,
open2bizz/odoo-addons,
sc4you/odoo-addons-2,
sferket/odoo-addons,
and
tate11/odoo-addons |
<h1>Orbeon - Integrate Orbeon Forms with Odoo</h1>
<h2>General information</h2>
<p>General information is available online:</p>
<ul>
<li><a href="https://www.odoo.com/apps/modules/10.0/orbeon">About this Odoo App</a></li>
<li>For more information about Orbeon Forms visit <a href="http://www.orbeon.com">orbeon.com</a></li>
</ul>
<h2>Important notes</h2>
<ul>
<li>It's currently only tested with "Orbeon Forms" <strong>Release 2016.3</strong>.</li>
<li>Reported <a href="https://github.com/open2bizz/odoo-addons/issues/33">issue #33</a>: Orbeon compatibility 2017.1 and onwards (breakage)</li>
</ul>
<h2>Installation</h2>
<p>Some system administration (with root access) is required.</p>
<h3>1. Orbeon Forms</h3>
<h4>1.1 Get and install Orbeon Forms</h4>
<p>Orbeon Forms is a Java (web)application. It has extensive <a href="https://doc.orbeon.com/installation">documentation</a></p>
<h4>1.2 Configure Orbeon Forms to connect with Odoo</h4>
<p><em>The Orbeon Persistence configuration</em></p>
<p>Orbeon Forms is configured via <em>configuration properties</em>.<br/>
For more info visit https://doc.orbeon.com/configuration/properties/</p>
<p><strong>Open or create the Orbeon properties file:</strong>
<code>
<ORBEON-ROOT-DIR>/WEB-INF/resources/config/properties-local.xml
</code></p>
<p>For example, if Orbeon is deployed by Tomcat: </p>
<p><code>
/var/lib/tomcat8/webapps/<ORBEON>/WEB-INF/resources/config/properties-local.xml
</code></p>
<p><strong>Ensure the following properties are set:</strong></p>
<p>Property | Explanation
-------- | -----------
<code>oxf.fr.persistence.provider.odoo.*.form</code> | Form definitions for all forms in application "odoo".
<code>oxf.fr.persistence.provider.odoo.*.data</code> | Form data for all forms in application "odoo".
<code>oxf.fr.persistence.odoo.uri</code> | Specifies the location, via HTTP, of the provider implementation. In this case the Odoo host with a specific configured <strong>port</strong> in the (Odoo) <a href="#odoo-orbeon-server">"Orbeon Server"</a> (see section <strong>2.4</strong> below).</p>
<p><strong>Configuration example:</strong></p>
<p>This is the most easy configuration. All Orbeon applications and services are handled over to Odoo.</p>
<p>``` xml
<property
as="xs:string"
name="oxf.fr.persistence.provider.*.*.*"
value="odoo"/></p>
<p><property as="xs:anyURI"
name="oxf.fr.persistence.odoo.uri"
value="http://localhost:8090"/>
```</p>
<p><strong>It's recommended to set the following property:</strong></p>
<p>The following property enables Odoo to install several sample forms from Orbeon - as "Builder Templates".
This eases creating the first Builder Form, by copying the Form Definition by the choosen Builder Template.</p>
<p><strong>! No security risk had been found yet. It seems all other (except the samples) Builder and Runner Forms, stored in Odoo, won't be exposed by this setting.</strong></p>
<p><code>xml
<property
as="xs:string"
processor-name="oxf:page-flow"
name="service-public-methods"
value="GET HEAD"/>
</code></p>
<h3>2. Odoo - Orbeon App</h3>
<h4>2.1 Get this App</h4>
<p>Put it in your Odoo addon-path.</p>
<ol>
<li><a href="https://www.odoo.com/apps/modules/10.0/orbeon">Download from the Odoo Apps site</a></li>
<li>"Git clone" the repository and checkout the Odoo version branch. This provides simpler updates for the "Git savvy".</li>
</ol>
<h4>2.2 Python dependencies</h4>
<p>Install the required Python libraries. (Also required for the unittests)</p>
<p><code>pip install -r requirements.txt</code></p>
<h4>2.3 Install the Orbeon App</h4>
<p>Just install it in Odoo like any regular Odoo App.</p>
<h4>2.4 Create Orbeon Server</h4>
<ol>
<li>Via the Odoo main menu, go to: <em>Orbeon > Server</em></li>
<li>Click <em>Create</em> and fill in the following form fields:</li>
</ol>
<p>Section | Field | Description
-------- | ----- | ------------
Orbeon Server | <strong>Name</strong> | A descriptive name
Orbeon Server | <strong>URL</strong> | URL to the Orbeon Forms Application, e.g: http://localhost:8080/orbeon
Orbeon Server | <strong>Description</strong> | Anything (not mandatory)
Orbeon Persistence Server | <strong>Port</strong> | An available (Unix/Linux) port
Orbeon Persistence Server | <strong>Process-type</strong> | WSGI/Webserver process type
Orbeon Persistence Server | <strong>Config-file path</strong> | Odoo connection settings and such; See [configfile][configfile] Especially easy for developers. Or in case there's no Webserver in front yet - with authentication via HTTP-headers.
Orbeon Persistence Server | <strong>Autostart</strong> | Whether the Orbeon Server connection automatically starts when Odoo server starts
Orbeon Persistence Server | <strong>Active</strong> | State of the Server and configuration, so it can't be started anyway.</p>
<h4>2.5 Config File "Odoo Persistence Server"</h4>
<p>Configuration example</p>
<ul>
<li><strong>server_url</strong>: Connect to Odoo server on 'localhost'</li>
<li><strong>port</strong>: Odoo port e.g. '8069'</li>
<li><strong>database_name</strong>: The Odoo database e.g. 'odoo'</li>
<li><strong>username</strong>: An 'odoo' user account with at least one of groups <strong>Orbeon User</strong>, <strong>Orbeon Admin</strong></li>
<li><strong>password</strong>: Password of the 'odoo' user account</li>
</ul>
<p><code>
[odoo config]
server_url: http://localhost
port: 8069
database_name: odoo
username: orbeon
password: orbeon
</code></p>
<h4>2.6 Start the Odoo Orbeon Server</h4>
<p>If everyting is setup correctly, you're now able to use Orbeon Forms via Odoo.</p>
<p>In case of failure or questions, first check the <em>Odoo server log</em> or the <em>Java Webserver log</em>.</p>
<h4>2.7 Odoo odoo/http.py</h4>
<p>Odoo commit <a href="https://github.com/odoo/odoo/commit/da1f153d61d747d9357694382fe04f96c0ca886a#diff-03542f2676ca18278ea62cb40f5a2261">da1f153d61d747d9357694382fe04f96c0ca886a</a> stopped the password
from being stored in the session.
This is a problem for the current SSO function for Orbeon via Odoo.
We do not have a good fix for this yet.
The workaround is to modify http.py. We added the file http.patch for that. </p>