[MIG] attachment_preview: Migration to 11.0

[FIX] Lint

[FIX] lint and flake

[ADD] tests

[ADD] tests

[ADD] tests

[ADD] Tests

[ADD] Package python-magic

[ADD] Tests

[FIX] Lint
This commit is contained in:
tarteo
2018-07-11 14:13:08 +02:00
committed by Holger Brunn
parent 3926dc4392
commit 66ee6b88e3
36 changed files with 2242 additions and 1374 deletions

View File

@@ -1,15 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-extend="Sidebar">
<t t-jquery="a.oe_sidebar_delete_item" t-operation="before">
<a t-if="section.name == 'files' and !item.callback and item.url" href="#" class="oe-sidebar-attachment-preview" t-att-data-id="item.id" t-att-data-url="item.url" t-attf-title="Preview #{item.name}">
<img t-att-src='_s + "/web/static/src/img/icons/gtk-print-preview.png"' width="12" height="12" border="0"/>
</a>
</t>
</t>
<t t-extend="FieldBinaryFile">
<t t-jquery="a.oe_form_uri" t-operation="after">
<img class="oe-binary-preview" t-att-src='_s + "/web/static/src/img/icons/gtk-print-preview.png"'/>
<t t-jquery="span.o_sidebar_delete_attachment" t-operation="before">
<span t-if="section.name == 'files' and widget.options.editable and !item.callback and item.url"
class="fa fa-search o_sidebar_preview_attachment"
t-att-data-id="item.id"
t-att-data-url="item.url"
t-attf-title="Preview #{item.name}"/>
</t>
</t>
</templates>