When displaying attachment download in tree, it contains garbage: (%<-size%>)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web (MOVED TO GITHUB) |
New
|
Undecided
|
Unassigned |
Bug Description
I want to display for a portal kind of application a download link to an attachment in a tree. No further info on the attachment should be shown to the user.
This is my field definition in the view:
<field
name="attachmen
colspan="3"
nolabel="1"
mode="tree"
readonly="1">
<tree
editable="top"
string=
<field
name="type"
<field
<field
</tree>
</field>
When displaying attachment download in tree, it contains garbage: (%<-size%>)
The (%<-size%>) is apparantly a placeholder to put the size of the file.
The code that actualyly creates this text is in addons/
324 case "binary":
325 var text = _t("Download"),
326 download_url = _.str.sprintf(
327 if (column.filename) {
328 download_url += '&filename_field=' + column.filename;
329 if (row_data[
330 text = _.str.sprintf(
331 row_data[
332 }
333 }
334 return _.template('<a href="<
335 text: text,
336 href: download_url,
337 size: row_data[
338 });
No idea how the size of the file is supposed to come from row_data[