I'm trying to create a web gallery inside odoo.
I'm unable to use the t-field tag in the view even if t-esc works.
Following my template:
<t t-name="MediaElements">
<div t-foreach="records" t-as="o" class="col-md-2">
<span t-field="o.stream" t-field-options="{'widget': 'image'}" />
</div>
</t>
And my JS:
this.alive(model.query(['stream', 'scope']).filter().all()).then(function (records) {
console.log(records);
self.$('#media-elements').append(QWeb.render("MediaElements", {records: records}));
});
If I use t-esc all things goes well, but I don't know how to display images stream (base64).
Any hints?
Thanks.
Aucun commentaire:
Enregistrer un commentaire