Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2365 Vizualizări

Hi guys,


I'm trying to sync some product data to some external software, and I need an ID for the product images. I can only seem to get the binary image data from the product.product record, so I want to get the ir.attachment ID instead.


I thought I'd be able to just run env["ir.attachment"].search([('res_id', '=', record.id)]) but this doesn't return any results. 


Using env["ir.attachment"].search() gets a list of the attachments, but the ones I need are missing. I've checked the database and it seems to only get rows where the 'public' column is set to 'true', but all the product image attachments have a public value of null.


Is there a way to get around this and search all ir.attachment rows? Or have it so product images are automatically set to public?


Thanks!

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
iul. 24
1039
4
feb. 25
14270
0
iul. 24
977
3
mar. 23
4612
1
iul. 21
4632