İçereği Atla
Menü
Bu soru işaretlendi
4 Cevaplar
27308 Görünümler

Hi ! 


I'm modifying the Product Labels view in Odoo V.0. I'd like to insert pictures linked to the activation of new fields I've created.

Can you tell me where the images are stored so I can refer to this URL or something else in my view ?

Thanks !


Avatar
Vazgeç

product images stored in DB as Binary and you can find it in image_medium field under Product.Template model

Hi Waleed ! 

Thanks for your reply ! 
My question is not clear. It's not about product image but about other images like the one attached, linked to a new field I've created.
Example : my field is "Organic" 
If "Organic" is true, then the image attached will appear on my label.
So I need to be able to store this image on my DB and then to refer to it so I can write something like...
<t t-if="product.organic">
    <img ... > </img>
</t>



Picto_Feuille_BIO.jpg

Le lun. 22 janv. 2018 à 18:03, Waleed Mohsen <mohsen.waleed@gmail.com> a écrit :

product images stored in DB as Binary and you can find it in image_medium field under Product.Template model

--
Waleed Mohsen


Sent by Odoo S.A. using Odoo.

try this

Store it in your module folder under static/src/img and you reference it from XML

<img src='/module name/static/src/img/image_name />

Thanks for your answer ! 
I'm sorry... I'm a real beginner.
Can you tell me how to access ir_attachments so I can upload images and then reference them in my Product Label view ?

Le lun. 22 janv. 2018 à 19:42, Hilar <hilarak@gmail.com> a écrit :

A new answer on Where are stored the images ? has been posted. Click here to access the post :

See post



Sent by Odoo S.A. using Odoo.

En İyi Yanıt

All attachments in odoo are stored under the table ir_attachments. Here odoo stores the res_model, res_id, its binary data, then the file type and so on.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Haz 25
2648
0
Eki 24
1150
1
Nis 24
1637
0
Eki 23
1197
0
Mar 23
1581