ONLYOFFICE Docs is an open-source office suite that offers collaborative editors for text documents, spreadsheets, presentations, and digital forms, along with a PDF viewer and converter. The software is distributed under the AGPL v3.0 license, using OOXML as its core format.
ONLYOFFICE Docs integrates seamlessly with numerous cloud services, including CMS frameworks (WordPress, Strapi, Drupal), collaboration and content platforms (ONLYOFFICE Workspace, Nextcloud, Seafile, Confluence, Alfresco), issue trackers (Jira, Redmine), and e-learning solutions (Moodle, Chamilo, HumHub). Additionally, it allows embedding the editors into your own web service.
Odoo is an open-source suite of business apps covering CRM, e-commerce, billing, accounting, manufacturing, warehouse, project, and inventory management. By integrating ONLYOFFICE with Odoo, users can edit and collaborate on office files directly within the Odoo Documents.
This tutorial guides you through connecting ONLYOFFICE Docs and Odoo using an integration app.
Step 1: Install ONLYOFFICE Docs
To work with office documents within Odoo, you need an instance of ONLYOFFICE Docs (Document Server). The installation method recommended by the developers is using Docker. This allows you to install the latest version of the editors with all dependencies by executing a single command:
sudo docker run -i -t -d -p 8080:80 --restart=always onlyoffice/documentserver
For detailed installation instructions, refer to this HowtoForge tutorial.
If you’re new to Odoo, this guide will help you install it on Ubuntu 22.04.
Step 2: Install Integration App
The ONLYOFFICE integration app for Odoo is distributed under the AGPL-3 license.
Navigate to the Odoo Apps catalog, select your installed Odoo version, search for ONLYOFFICE, and download it. Place the ONLYOFFICE app into /path/to/odoo/addons, ensuring that the ONLYOFFICE folder is named onlyoffice_odoo.
Alternatively, add these lines to the /path/to/odoo/config/odoo.conf
file to specify your path to the folder with apps:
[options] addons_path = /mnt/extra-addons
Then, install the necessary package:
pip install pyjwt
Once the installation is complete, switch Odoo to developer mode and click Apps -> Update Apps List, or simply restart your Odoo instance. Installation from the admin panel is also an option.
Step 3: Configure Your Instance
In Odoo, navigate to Home menu -> Settings -> ONLYOFFICE and enter the following parameters:
- Document Server URL: Enter the URL of your installed ONLYOFFICE Docs.
- Document Server JWT Secret: JWT is enabled by default with an automatically generated secret key for backend document access control. You may specify a custom secret key in this field, ensuring the same key is set in the ONLYOFFICE Docs config file for validation.
- Document Server JWT Header: The standard JWT header in ONLYOFFICE is Authorization. If this header conflicts with your setup, modify it to a custom one.
Step 4: Use ONLYOFFICE Docs in Odoo
The editors can be launched in any Odoo section where file upload/attachment is possible. For instance, you can open chat attachments in the Discuss section or edit attached deal notes in the Sales section:
Available actions and supported file formats include:
- Editing DOCX, XLSX, PPTX files.
- Collaborating on documents in real time.
- Editing form templates in DOCXF format.
- Reading PDF files.
- Viewing other office file formats, including RTF, TXT, CSV, etc.
This setup allows you to efficiently work with office documents uploaded to Odoo using ONLYOFFICE Docs.
Frequently Asked Questions (FAQ)
- What is the core format used by ONLYOFFICE Docs?
ONLYOFFICE Docs uses OOXML as its core format. - Which platforms can ONLYOFFICE Docs integrate with?
ONLYOFFICE can integrate with CMS frameworks like WordPress, Strapi, Drupal; collaboration platforms like ONLYOFFICE Workspace, Nextcloud; issue trackers like Jira, Redmine; and e-learning solutions such as Moodle and Chamilo. - How do I install ONLYOFFICE Docs?
The recommended installation method is using Docker. You can execute the command:sudo docker run -i -t -d -p 8080:80 --restart=always onlyoffice/documentserver
- What is required to enable JWT in ONLYOFFICE Docs?
JWT is enabled by default in ONLYOFFICE Docs. You’ll need to ensure that the secret key specified in Odoo corresponds with the one in the ONLYOFFICE Docs config to enable JWT validation. - Can I use ONLYOFFICE Docs to edit PDFs?
ONLYOFFICE Docs supports reading PDF files but editing capabilities are limited to DOCX, XLSX, PPTX, and DOCXF formats.