DEV Community

Cover image for Odoo : attachment not found error
Jeevachaithanyan Sivanandan
Jeevachaithanyan Sivanandan

Posted on • Edited on

Odoo : attachment not found error

Odoo 16 + postgresql issue with attachment not found -

If you are an Odoo Developer, often we get an error in Odoo console as below


FileNotFoundError: [Errno 2] No such file or directory: 'odoo/data/filestore/sit-16/27/2781a5a3f35b23fa0b47023790bf3f21d8df9c43'

and this may cause issues at the Odoo UI in web browser.
There is a work around to fix this.

  • 1. login as postgresql user
  • 2. find and connect to the database you are using
  • 3. run the below query to clear cache

to login
psql -U postgres
then
command \l to list databases

then to connect

**\connect database_name;**


delete from ir_attachment where url ilike '/web/as%s';

stop and restart Odoo server few times and it will be fixed !

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay