Odoo - Nuxeo integration for document management

Business management tools like customer management (CRM), purchasing (SCM), human resources (HR), production and warehouse (MRP), etc, use and generate a huge amount of documents like budgets, invoices, contracts, e-mail messages and many others.

Dealing with all these content, including theire classification, organization and availability to be searchable is critical to business efficiency.

The solution developed by Multibase for Odoo ERP allows all documents generated by the ERP (like invoices, contracts, pictures, etc.) to be stored into a company defined structure, dynamically by model in the document management system. As a example, invoices can be archived by year and by month, contracts and documents from the employee can be archieved by type and by employee, reports can be archieved by type, etc.

The main features of this solution are described in the following points. For more information please contact us.


Technical Description

Name: Odoo/Nuxeo Integration

Technical name: mb_ecm_odoo_nuxeo

Module dependencies:

base (odoo)

document (odoo)

cmislib (https://chemistry.apache.org/python/cmislib.html)

The module uses the cmislib bridge for Odoo developed by Multibase and available from mb_cmislib_odoo module. This bridge allows an easier implementation for the various operations needed by the module.



The configuration screen is found in the Odoo's company settings (Settings > Companies > Archive Configuration), as shown below:

Attachment Processing


Module configuration fields


Attachment Processing


Nuxeo URL:Full Nuxeo CMIS URL (e.g. http://example.com:8080/nuxeo/atom/cmis)

Username:Nuxeo username

Password:Nuxeo password (Documents will be created using this user. Document access rights can be managing via Nuxeo ACL)

"Test Connection" button:When invoked, it will try to connect to Nuxeo with the specified details above and will return a response whether the connection is successful or not.

"Call Nuxeo" button: When invoked, it will call the module's main routine, which is to process attachments and send them to the specified Nuxeo server, using a path configuration.


Attachment Processing


"Process attachments?" checkbox:To activate the module and process attachments by sending them to Nuxeo according to Model Associations configuration.

Model Associations:The majority of models (or objects) in Odoo can have documents attached to them. This field allows us to specify custom nuxeo paths for each one. Each entry in this one2many field is called a model association


Creating a model association

After clicking on "Add an item" on the list, the following modal box is displayed:

Creating a model association

Model name: Name of the model (or object) to process attachments of (e.g. res.partner).

Root path: Nuxeo repository base directory. This folder must be already created.

Path Association: This field allows to create dynamic paths in Nuxeo, using the data from the model entry associated with. For example, using Odoo's CRM module, we can have a folder named "Partners" and in that folder dynamically create subfolders for each partner, using his name or any other field in the model. (See bellow how to create a path association)

Active: Whether the model association is active or not. If not active, the model's attachements will be ignored.


Creating a path association


There are three type of values you can use to create the path structure:

Static folder name

An attachment's filename

The value of a field in the model

The value of a field on another model, referenced by a one2many field.

Specifying date fields

For the path association, we have a checkbox which is called "Is datetime field". Its purpose is to indicate that the parameter or the referenced field name is a date or datetime type of field.


Attachment Processing


Data field type

Indicates the type of date time field.


Datetime format string

A string which accepts python's _strftime()_ formatting.

Example values:

"Accounting %Y" will be converted to "Accounting 2014"

"%Y-%m-%d" will be converted to "2015-10-24"


Parsing attachment filename


It is possible to create a path association by parsing the attachment's filename and saving it to a specific folder. This is useful in case a model generates more than one report and we have to archive them in different folders.

Attachment Processing


When we select this option, we have to fill in two fields:


Lookup Type

Indicates the type of lookup. Available options are:

  • Regex
  • Start of string
  • End of string
  • String includes


Lookup string

The string to search for in the filename, according to to the lookup type defined above.

Example configuration for the accounting module:

The following example is an invoice structure, sorted by date. The final path configuration will be:

< month and year > / "Customer Invoices" or "Supplier Invoices" / Customer's name

The model association will look like this:

Attachment Processing


First, the date field:

Attachment Processing


Assuming the customers' invoices start with "INVC", the association will be:

Attachment Processing


Assuming the suppliers' invoices start with "INVS", the association will be:

Attachment Processing


Finally, for the Customer's / Supplier's name:

Attachment Processing



There are two ways of running the export process.

  • Automatic
    When the "Process attachments" checkbox is selected, the module will automatically create a scheduled action and will run, by default, every 5 minutes.
  • Manual
    The process can be executed manually by clicking the "Archive Documents" button.