检索存储在数据库odoo 13中的product_template图像

问题描述

我有nodejs服务器,并使用pg模块连接到postgres。 ir_attachment表中的数据二进制字段为空。图像可能存储在Windows目录中。我只能检索文件名和校验和。如何将内容放在一起并生成网址。我正在使用odoo版本13。请帮助

我尝试使用odoo网址示例:http://example.com/web/image?model=pos.category&id=5&field=image_128,但是图像无法预览。

enter image description here

解决方法

在安全文件中允许公共用户的示例。起初我把 base.group_public 放在 base.group_user 之上。但是没有用。

access_modulename_planned_locations,modulename.planned.locations,model_modulename_planned_locations,base.group_user,1,1
access_modulename_planned_locations,base.group_public,0