How to preview images after uploading in Odoo V10?

陌路散爱 提交于 2019-12-24 09:57:02

问题


There is ir.attachment model available for uploading URL and files but I want to upload images and that can be viewed on the uploading form UI-view.

Is there any way I can do it as I haven't found anything on this related to Odoo V10.

How can we solve this issue?


回答1:


odoo app available on odoo apps page please go throw this url may be it will help you [https://apps.odoo.com/apps/modules/category/Extra%20Tools/browse?search=image+preview] if this helped you please up-vote my answer




回答2:


You can try this:

Add this code in your .py

attachment = fields.Many2many("ir.attachment", string="Attachment")

and .xml

<field name ="attachment" widget="many2many_binary"/>

I hope it works for you.



来源:https://stackoverflow.com/questions/46148687/how-to-preview-images-after-uploading-in-odoo-v10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!