Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
10200 มุมมอง

I received errors after change data_dir path to /var/lib/odoo (Odoo 13 docker)

How can I clean cache ?

2020-06-25 15:19:04,648 1 INFO odoo odoo.addons.base.models.ir_attachment: _read_file reading /var/lib/odoo/filestore/odoo/2f/2f7028932480cdcb927f83b0165d577669e620fa
web_1  | Traceback (most recent call last):
web_1  |   File "/usr/lib/python3/dist-packages/odoo/api.py", line 745, in get
web_1  |     value = self._data[field][record._ids[0]]
web_1  | KeyError: 273
web_1  |
web_1  | During handling of the above exception, another exception occurred:
web_1  |
web_1  | Traceback (most recent call last):
web_1  |   File "/usr/lib/python3/dist-packages/odoo/fields.py", line 996, in __get__
web_1  |     value = env.cache.get(record, self)
web_1  |   File "/usr/lib/python3/dist-packages/odoo/api.py", line 751, in get
web_1  |     raise CacheMiss(record, field)
web_1  | odoo.exceptions.CacheMiss: ('ir.attachment(273,).datas', None)
web_1  |
web_1  | During handling of the above exception, another exception occurred:
web_1  |
web_1  | Traceback (most recent call last):
web_1  |   File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 103, in _file_read
web_1  |     with open(full_path,'rb') as fd:
web_1  | FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/odoo/filestore/odoo/2f/2f7028932480cdcb927f83b0165d577669e620fa'

อวตาร
ละทิ้ง

Did you find a solution?

คำตอบที่ดีที่สุด

Hii,

Ensure Filestore Exists

Check if the filestore for your DB exists:

ls /var/lib/odoo/filestore/<your_db_name>


Fix Permissions

Make sure Odoo can access the folder:

chown -R odoo:odoo /var/lib/odoo

chmod -R 755 /var/lib/odoo


Clear Python & Odoo Cache (inside container)

docker exec -it <your_container> find /usr/lib/python3 -name "*.pyc" -delete

docker exec -it <your_container> rm -rf /var/lib/odoo/.local


Restart Docker


docker-compose down

docker-compose up -d --build


i hope it is use full
i dont know you are which os use 

this is for ubuntu

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ย. 22
3531
1
พ.ย. 20
5630
6
มิ.ย. 20
21864
2
มิ.ย. 25
494
2
ธ.ค. 24
4502