summaryrefslogtreecommitdiff
path: root/addons/mail/views/mail_message_views.xml
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2017-08-17 14:08:51 +0200
committerOlivier Dony <odo@openerp.com>2017-08-17 14:15:13 +0200
commit6bafe8e9a87ba71253272b6d83c05608f5c8953f (patch)
treea3ff433659612373bca5902270a50111b6c4eadf /addons/mail/views/mail_message_views.xml
parent15f14cee2aaa5881524301dfad1e98e0cc47e293 (diff)
[FIX] mail, mrp: adapt attachment kanban to new ID format
As of saas-16 and the new web client views, the "display value" for a record's ID is now formatted with thousand separators. This breaks a few kanban views where the ID was inserted into a dynamic URL. Using `raw_value` is correct too and fixes the problem. Note: This might affect other kanban views using integer field values, but a quick search did not yield anything. Many2One fields already had different "display values", so `raw_value` is already used when needed. Other integer fields, such as computed counts and sums are often displayed but not inserted into URLs or technical values where the problem would occur.
Diffstat (limited to 'addons/mail/views/mail_message_views.xml')
-rw-r--r--addons/mail/views/mail_message_views.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/views/mail_message_views.xml b/addons/mail/views/mail_message_views.xml
index 75ffea35a5e..19ad37d44a5 100644
--- a/addons/mail/views/mail_message_views.xml
+++ b/addons/mail/views/mail_message_views.xml
@@ -148,11 +148,11 @@
<field name="name"/>
</div>
<div t-if="record.type.raw_value == 'binary'">
- <a t-attf-href="/web/content/#{record.id.value}?download=1">
+ <a t-attf-href="/web/content/#{record.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.value}?download=1"/>
+ <img t-attf-src="/web/image/#{record.id.raw_value}?download=1"/>
</div>
</a>
</div>