diff options
| author | Joren Van Onder <jov@odoo.com> | 2017-09-27 12:48:55 -0700 |
|---|---|---|
| committer | Joren Van Onder <jov@odoo.com> | 2017-09-27 17:14:43 -0700 |
| commit | 8cbd29f696632d53e57cb5ef890ad27f149bd8a9 (patch) | |
| tree | 9622febfd1136501124d097553accf768e4689b5 | |
| parent | ca258b8691c3581f0ec4d203b591c2279cc7a6a2 (diff) | |
[FIX] mrp: display attachment image in mrp.document kanban view
Before this the mrp.document id was used to construct the /web/image/
link which lead to the wrong attachment being previewed and
downloaded. Introduced by the refactoring that happened in
d193350c6f0348b5badd51d69ff2c840ae379a6a.
| -rw-r--r-- | addons/mrp/views/ir_attachment_view.xml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/mrp/views/ir_attachment_view.xml b/addons/mrp/views/ir_attachment_view.xml index 7d3e5d47daa..cf6b00982c7 100644 --- a/addons/mrp/views/ir_attachment_view.xml +++ b/addons/mrp/views/ir_attachment_view.xml @@ -6,7 +6,7 @@ <field name="model">mrp.document</field> <field name="arch" type="xml"> <kanban> - <field name="id"/> + <field name="ir_attachment_id"/> <field name="mimetype"/> <field name="type"/> <field name="datas_fname"/> @@ -19,11 +19,11 @@ <div class="oe_attachment"> <div class="row"> <div class="col-xs-4 o_kanban_primary_left" t-if="record.type.raw_value == 'binary'"> - <a t-attf-href="/web/content/#{record.id.raw_value}?download=1"> + <a t-attf-href="/web/content/#{record.ir_attachment_id.raw_value}?download=1"> <t t-set="webimage" t-value="new RegExp('image.*(gif|jpeg|jpg|png)').test(record.mimetype.value)"/> <div t-if="!webimage" class="o_image" t-att-data-mimetype="record.mimetype.value"/> <div t-if="webimage" class="o_attachment_image"> - <img t-attf-src="/web/image/#{record.id.raw_value}?download=1"/> + <img t-attf-src="/web/image/#{record.ir_attachment_id.raw_value}?download=1"/> </div> </a> </div> |
