ir_attachment_view.xml
6.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Files -->
<record model="ir.ui.view" id="view_document_file_kanban_acct">
<field name="name">acct.document kanban.acct</field>
<field name="model">mrp.document</field>
<field name="arch" type="xml">
<kanban>
<field name="ir_attachment_id"/>
<field name="mimetype"/>
<field name="type"/>
<field name="datas_fname"/>
<field name="name"/>
<field name="priority"/>
<field name="create_uid"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_area o_kanban_attachment oe_kanban_global_click">
<div class="o_kanban_image">
<div class="o_kanban_image_wrapper">
<t t-set="webimage" t-value="new RegExp('image.*(gif|jpeg|jpg|png)').test(record.mimetype.value)"/>
<div t-if="record.type.raw_value == 'url'" class="o_url_image fa fa-link fa-3x text-muted"/>
<img t-elif="webimage" t-attf-src="/web/image/#{record.ir_attachment_id.raw_value}?field=thumbnail" width="100" height="100" alt="Document" class="o_attachment_image"/>
<div t-else="!webimage" class="o_image o_image_thumbnail" t-att-data-mimetype="record.mimetype.value"/>
</div>
</div>
<div class="o_kanban_details">
<div class="o_kanban_details_wrapper">
<div class="o_kanban_record_title">
<field name="name" class="o_text_overflow"/>
</div>
<div class="o_kanban_record_body">
<field name="datas_fname" attrs="{'invisible':[('type','=','url')]}"/>
<field name="url" widget="url" attrs="{'invisible':[('type','=','binary')]}"/>
</div>
<div class="o_kanban_record_bottom">
<span class="oe_kanban_bottom_left">
<field name="priority" widget="priority"/>
</span>
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_small', record.create_uid.raw_value)" t-att-data-member_id="record.create_uid.raw_value" t-att-alt="record.create_uid.raw_value" width="32" height="32" class="oe_kanban_avatar"/>
</div>
</div>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record model="ir.ui.view" id="view_partner_document_file_kanban_acct">
<field name="name">acctpartner.document kanban.acct</field>
<field name="model">mrp.document</field>
<field name="arch" type="xml">
<kanban>
<field name="ir_attachment_id"/>
<field name="mimetype"/>
<field name="type"/>
<field name="datas_fname"/>
<field name="name"/>
<field name="priority"/>
<field name="create_uid"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_area o_kanban_attachment oe_kanban_global_click">
<div class="o_kanban_image">
<div class="o_kanban_image_wrapper">
<t t-set="webimage" t-value="new RegExp('image.*(gif|jpeg|jpg|png)').test(record.mimetype.value)"/>
<div t-if="record.type.raw_value == 'url'" class="o_url_image fa fa-link fa-3x text-muted"/>
<img t-elif="webimage" t-attf-src="/web/image/#{record.ir_attachment_id.raw_value}?field=thumbnail" width="100" height="100" alt="Document" class="o_attachment_image"/>
<div t-else="!webimage" class="o_image o_image_thumbnail" t-att-data-mimetype="record.mimetype.value"/>
</div>
</div>
<div class="o_kanban_details">
<div class="o_kanban_details_wrapper">
<div class="o_kanban_record_title">
<field name="name" class="o_text_overflow"/>
</div>
<div class="o_kanban_record_body">
<field name="datas_fname" attrs="{'invisible':[('type','=','url')]}"/>
<field name="url" widget="url" attrs="{'invisible':[('type','=','binary')]}"/>
</div>
<div class="o_kanban_record_bottom">
<span class="oe_kanban_bottom_left">
<field name="priority" widget="priority"/>
</span>
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_small', record.create_uid.raw_value)" t-att-data-member_id="record.create_uid.raw_value" t-att-alt="record.create_uid.raw_value" width="32" height="32" class="oe_kanban_avatar"/>
</div>
</div>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
</odoo>