Odoo 16 and 17 Connector not working

Hello,

I am reaching out for assistance with an integration challenge we are facing between ONLYOFFICE and Odoo.

We are utilizing the ONLYOFFICE Odoo Connector versions 2.1.0 and 2.0.0, along with the ONLYOFFICE Odoo Documents Connector versions 2.1.0 and 2.0.0, in our setup which includes Odoo 16.0+e (Enterprise Edition) and Odoo 17.0+e (Enterprise Edition).

Our system consists of Odoo, Nextcloud, PostgreSQL, and the ONLYOFFICE Document Server (image: onlyoffice/documentserver:latest which should be currently v8) , each operating within its own Docker container.
(also onlyoffice/documentserver:7.2 was tested)

Following Document Server Ports are open:

ports:
- 8085:80
- 3000:3000
- 8000:8000
- 4369:4369
- 5672:5672

We have been able to open and edit documents stored in Nextcloud seamlessly, and the example site functions perfectly for document creation, editing, or uploading. However, we encounter issues when attempting to open documents stored in Odoo.

This issue has been ongoing for approximately six months, during which we have made several attempts to establish a functional connection between ONLYOFFICE and Odoo, unfortunately, without success. We have ensured that the services.CoAuthoring.request-filtering-agent.allowPrivateIPAddress setting is configured to true to allow access to private IP addresses.

Error Description: The specific error we encounter when trying to open documents stored in Odoo is detailed in the logs as follows:

css

ODOO_NET_ONLYOFFICE              | [2024-02-11T19:15:30.816] [ERROR] [localhost] [1676ecb1ec97e1d78be3df63789092a263897a9a32a] [2] nodeJS - error downloadFile:url=http://192.168.17.11:8075/onlyoffice/file/content/167?oo_security_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Mn0.UdrgFcba6pfOYOl9Uu0NGxPb_Y51KFhOzxDz64X5L8E;attempt=3;code:null;connect:null Error: Error response: statusCode:404; headers:{"content-type":"text/html; charset=utf-8","content-length":"232","server":"Werkzeug/2.0.2 Python/3.10.12","date":"Sun, 11 Feb 2024 19:15:30 GMT"};
ODOO_NET_ONLYOFFICE              |     at Request.fResponse (/snapshot/server/Common/sources/utils.js)
ODOO_NET_ONLYOFFICE              |     at Request.emit (node:events:527:28)
ODOO_NET_ONLYOFFICE              |     at Request.onRequestResponse (/snapshot/server/Common/node_modules/request/request.js:1066:10)
ODOO_NET_ONLYOFFICE              |     at ClientRequest.emit (node:events:527:28)
ODOO_NET_ONLYOFFICE              |     at HTTPParser.parserOnIncomingClient (node:_http_client:631:27)
ODOO_NET_ONLYOFFICE              |     at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
ODOO_NET_ONLYOFFICE              |     at Socket.socketOnData (node:_http_client:494:22)
ODOO_NET_ONLYOFFICE              |     at Socket.emit (node:events:527:28)
ODOO_NET_ONLYOFFICE              |     at addChunk (node:internal/streams/readable:315:12)
ODOO_NET_ONLYOFFICE              |     at readableAddChunk (node:internal/streams/readable:289:9)
ODOO_NET_ONLYOFFICE              |     at Socket.Readable.push (node:internal/streams/readable:228:10)
ODOO_NET_ONLYOFFICE              |     at TCP.onStreamRead (node:internal/stream_base_commons:190:23)

This error suggests that the document server is unable to find the requested document, resulting in a 404 status code.

Request for Assistance: We are seeking your guidance and support in resolving this issue. Are there any known compatibility issues, configuration settings, or additional troubleshooting steps that we should consider to resolve this error? Any insights or recommendations would be greatly appreciated.

Please let me know if further information, logs, configuration settings is needed to diagnose and address this problem more effectively.

Thank you for your attention and assistance with this matter.
Maybe it will help some of the people here too: Onlyoffice return Download failed #18

Best regards,

1 Like

Hello @Wickeddoc

Please note that latest integration app supports only version 16 or less of Odoo. Support of version 17 will be added in new version of the app a bit later.


May I know how did you install these connectors?

Additionally, please provide a screenshot of the settings of ONLYOFFICE app and let me know from where you are trying to open a document for editing.

By the way, are you using any proxy in your environment?

1 Like

Hi Constantine,

Thank you very much for your reply.

The V17 version is already in your Git repository, and we have installed it in our development environment.

Installing the Odoo module follows the same process every time: download the module, move it to the customer module folder, and install it in Odoo under Apps.

We tried to open documents from the Odoo Documents App (Enterprise) and from any other location (attachments) in Odoo.
However, what does work is creating an OnlyOffice document in the Odoo Documents App. There is a bug in this feature in your V17 version, which I am going to report on GitHub.

We have tested it with and without a reverse proxy, in several Docker environments. Normally, we have a reverse proxy running. However, for testing purposes, we have set up a second environment to properly rule out any errors in this aspect.

1 Like

Please note the branch for version 17 of Odoo is not yet published officially. That said, I’d recommend using officially released connector 2.0.0 only.


I suggest focusing on version 16 of Odoo in the first place since this version is supported. Please make sure that this instance is running with official version of the connector apps. You can get them here:
https://apps.odoo.com/apps/modules/16.0/onlyoffice_odoo/
https://apps.odoo.com/apps/modules/16.0/onlyoffice_odoo_documents/

After that, set up proper Document Server address and token credentials in the connector app settings again and check if it works.

If there are any issues, please provide the following:

  • output of docker ps command;
  • results of test of mutual accessibility between Document Server and Odoo 16 containers;
    You can do this by simply executing wget <documentserver_address> from Odoo container and vice versa wget <odoo_address> from Document Server container.

Hi Constantine,

Okay lets fokus on Odoo16::
OnlyOffice Connector installed from Odoo Store.
Odoo16.0 and Enterprise Addons up to date.

Document Server is a fresh Docker “install”: image: onlyoffice/documentserver:latest which should be currently v8)
Ports are open:

  • 8085:80
  • 3000:3000
  • 8000:8000
  • 4369:4369
  • 5672:5672

wget is working without any problems in both directions. services.
Odoo Docker Container is runing as root for test purpose.
CoAuthoring.request-filtering-agent.allowPrivateIPAddress is set to true.
Docker ps does not show any error.
no reverse proxy active.

result:
Nextcloud can open documents in only office.
The example Page doese work as expected (upload, create, modify).
Only Office Documents can be greated within the document app in odoo16 Enterprise.
Odoo Documents and/or Odoo Attachments can not be opend with onlyoffice.

I will provide the onlyofffice docker log later.
Basically it throws the same error as posted in my first post.

(My last message contains an error log with active reverse proxy… therefore I deleted it.)

Hi Constantine,

After debugging every relevant method of your connector, I was able to find the following problem.

The controller (HTTP) routes which are defined in your Odoo connector do not work when there is more than one database present.
Thats why it throws an 404 error and also can not be debugged with Postman.

So, I deleted all Odoo databases except one and voilà… Odoo16 and Odoo17 connector is working without any problem!

What a shame when I think about how long I have been searching for this error. :slight_smile:

So, everyone who has a (download failed) problem… please make sure that only one database is present and try again…

Opend an new issue: Issues with Session Management and Multi-Database Support in OnlyOffice Connector for Odoo ¡ Issue #25 ¡ ONLYOFFICE/onlyoffice_odoo ¡ GitHub

2 Likes

i have the same problem

Hello @filwu8

We are still working on this issue.


In the meantime, @Wickeddoc can you provide more details on the exact scenario you are describing here? I’d be useful for the community and our investigation too. Thank you.

Hi @Constantine,

I think it has very detailed documentation in the GIT issue linked above, which i have opened several months ago.
Including instructions for reproducing the error.

What further information do you need exactly?

Thank for your reply. I was interested in knowing how did you fix the issue with multiple databases. Sorry if I wasn’t clear.

Aaaa.
As we usually run more then one Database we simply dont run OnlyOffice at the moment.