forked from OCA/report-print-send
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pingen_document_view.xml
161 lines (150 loc) · 6.59 KB
/
pingen_document_view.xml
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="0">
<record id="view_pingen_document_tree" model="ir.ui.view">
<field name="name">pingen.document.tree</field>
<field name="model">pingen.document</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Pingen Document">
<field name="name"/>
<field name="datas_fname"/>
<field name="pingen_send"/>
<field name="pingen_speed"/>
<field name="pingen_color"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_pingen_document_form" model="ir.ui.view">
<field name="name">pingen.document.form</field>
<field name="model">pingen.document</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Pingen Document">
<group colspan="4" col="6">
<field name="name" readonly="True"/>
<field name="type" readonly="True"/>
<field name="company_id" readonly="True" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="Pingen.com">
<separator string="Options" colspan="4"/>
<newline />
<group col="2" colspan="2">
<field name="pingen_send" attrs="{'readonly': [('state', 'in', ['sendcenter', 'sent'])]}"/>
<field name="pingen_speed" attrs="{'readonly': [('state', 'in', ['sendcenter', 'sent'])], 'required': [('pingen_send', '=', True)]}"/>
<field name="pingen_color" attrs="{'readonly': [('state', 'in', ['sendcenter', 'sent'])]}"/>
</group>
<separator string="Dates" colspan="4"/>
<newline />
<group col="2" colspan="2">
<field name="push_date"/>
</group>
<group colspan="4" attrs="{'invisible': [('last_error_message', '=', False)]}">
<separator string="Errors" colspan="4"/>
<newline />
<group col="2" colspan="2">
<field nolabel="1" name="last_error_message"/>
</group>
</group>
<group colspan="4" attrs="{'invisible': [('state', 'not in', ['sendcenter', 'sent'])]}">
<separator string="Sendcenter" colspan="4"/>
<newline />
<group col="4" colspan="2">
<field colspan="4" name="post_status"/>
<group col="3" colspan="2">
<field name="cost"/>
<field colspan="1" nolabel="1" name="currency_id"/>
</group>
<newline/>
<field name="parsed_address"/>
<field name="country_id"/>
<field name="send_date"/>
<field name="pages"/>
</group>
</group>
<separator string="Actions" colspan="4"/>
<newline />
<group col="2" colspan="2">
<button name="push_to_pingen" type="object"
states="pending"
string="Push to pingen.com" icon="terp-stage"/>
<button name="ask_pingen_send" type="object"
states="pushed"
string="Ask pingen.com to send the document" icon="gtk-print"/>
<button name="resolve_error" type="object"
states="error,pingen_error"
string="Errors resolved" icon="gtk-redo"/>
<button name="update_post_infos" type="object"
states="sendcenter"
string="Update the letter's informations" icon="gtk-refresh"/>
</group>
</page>
<page string="Attachment">
<group col="4" colspan="4">
<separator string="Data" colspan="4"/>
<newline />
<group col="2" colspan="4" attrs="{'invisible':[('type','=','url')]}">
<field name="datas" filename="datas_fname" readonly="True"/>
<field name="datas_fname" select="1" readonly="True"/>
</group>
<group col="2" colspan="4" attrs="{'invisible':[('type','=','binary')]}">
<field name="url" widget="url" readonly="True"/>
</group>
</group>
<group col="2" colspan="4">
<separator string="Attached To" colspan="2"/>
<field name="attachment_id"/>
</group>
</page>
</notebook>
<field name="state" widget="statusbar"
statusbar_visible="pending,pushed,sent"
statusbar_colors='{"error":"red","pingen_error":"red","canceled":"grey","pushed":"blue","sent":"green"}'/>
</form>
</field>
</record>
<record id="view_pingen_document_search" model="ir.ui.view">
<field name="name">pingen.document.search</field>
<field name="model">pingen.document</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Pingen Document">
<filter icon="terp-project"
string="Pending"
domain="[('state','=','pending')]"/>
<filter icon="terp-stage"
string="Pushed"
domain="[('state','=','pushed')]"/>
<filter icon="gtk-print"
string="In Sendcenter"
domain="[('state','=','sendcenter')]"/>
<filter icon="kanban-apply"
string="Sent"
domain="[('state','=','sent')]"/>
<filter icon="kanban-stop"
string="Error"
domain="[('state','=','error')]"/>
<filter icon="STOCK_NO"
string="Pingen Error"
domain="[('state','=','pingen_error')]"/>
<filter icon="terp-dialog-close"
string="Canceled"
domain="[('state','=','canceled')]"/>
<separator orientation="vertical"/>
<field name="attachment_id" />
</search>
</field>
</record>
<record id="action_pingen_document" model="ir.actions.act_window">
<field name="name">Pingen Documents</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">pingen.document</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_pingen_document_search"/>
</record>
<menuitem action="action_pingen_document" id="menu_pingen_document" parent="base.next_id_4"/>
</data>
</openerp>