[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.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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.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>
|
||||
|
||||
Reference in New Issue
Block a user