forked from xlongfeng/manekineko
-
Notifications
You must be signed in to change notification settings - Fork 0
/
photobucket_view.xml
173 lines (163 loc) · 8.2 KB
/
photobucket_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
162
163
164
165
166
167
168
169
170
171
172
<?xml version="1.0"?>
<openerp>
<data>
<menuitem id="menu_photobucket" name="Photobucket" sequence="30" parent="menu_ebay_listing_activity"/>
<record model="ir.ui.view" id="photobucket_authorize_view">
<field name="name">photobucket authentication</field>
<field name="model">photobucket.authorize</field>
<field name="arch" type="xml">
<form string="photobucket authentication" version="7.0">
<separator string="Login photobucket to grant application access"/>
<p class="oe_grey" states="confirm">
Do you want to authroize for this photobucket consumer?
</p>
<footer states="confirm">
<button name="get_login_url" string="OK" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
<field name="oauth_token_key" invisible="1"/>
<field name="oauth_token_secret" invisible="1"/>
<field name="login_url" widget='url' states="login"/>
<field name="state" invisible="1"/>
<p class="oe_grey" states="login">
Sign in with your photobucket consumer ID and password to link your account to OpenERP.
<br/>
After successful login, click OK to complete the link procedure.
</p>
<footer states="login">
<button name="get_oauth_token" string="OK" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
<record id="action_photobucket_authorize" model="ir.actions.act_window">
<field name="type">ir.actions.act_window</field>
<field name="name">Photobucket Authentication</field>
<field name="res_model">photobucket.authorize</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record model="ir.ui.view" id="photobucket_consumer_form_view">
<field name="name">photobucket consumer form</field>
<field name="model">photobucket.consumer</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="photobucket consumer form" version="7.0">
<header>
<button class="oe_highlight" name="%(action_photobucket_authorize)d" string="Authorize" type="action"/>
</header>
<sheet>
<group>
<field name='name'/>
<field name='consumer_key'/>
<field name='consumer_secret'/>
<field name='oauth_token_key'/>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="photobucket_consumer_tree_view">
<field name="name">photobucket consumer tree</field>
<field name="model">photobucket.consumer</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="photobucket consumer tree">
<field name="name"/>
<field name='oauth_token_key'/>
</tree>
</field>
</record>
<record id="action_photobucket_consumer_tree" model="ir.actions.act_window">
<field name="name">Consumer</field>
<field name="res_model">photobucket.consumer</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="menu_photobucket_consumer" action="action_photobucket_consumer_tree" sequence="20" parent="menu_photobucket" groups="ebay.group_ebay_manager"/>
<record model="ir.ui.view" id="photobucket_media_form_view">
<field name="name">photobucket media form</field>
<field name="model">photobucket.media</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="photobucket media form" version="7.0">
<header>
<button class="oe_highlight" name="action_upload" confirm='Are you sure you want to upload this media?' string="Upload" type="object"/>
</header>
<sheet>
<div class="oe_right">
<field name="consumer_id" placeholder="Consumer"/>
</div>
<field name="image" widget='image' class="oe_avatar oe_left" options='{"preview_image": "image", "size": [500, 500]}'/>
<group>
<field name="name" default_focus="1"/>
<field name='description'/>
<field name='browseurl' widget='url'/>
<field name='thumb'/>
<field name='url'/>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="photobucket_media_tree_view">
<field name="name">photobucket media tree</field>
<field name="model">photobucket.media</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="photobucket media tree">
<field name="name"/>
<field name='url'/>
<field name='consumer_id'/>
</tree>
</field>
</record>
<!-- Photobucket Media Kanban View -->
<record model="ir.ui.view" id="photobucket_media_kanban_view">
<field name="name">photobucket media kanban</field>
<field name="model">photobucket.media</field>
<field name="arch" type="xml">
<kanban>
<field name="name"/>
<field name="url"/>
<field name="has_image"/>
<field name="consumer_id"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_vignette oe_semantic_html_override">
<a type="open">
<t t-if="record.has_image.raw_value === true">
<img t-att-src="kanban_image('photobucket.media', 'image_small', record.id.value)" class="oe_kanban_image"/>
</t>
<t t-if="record.has_image.raw_value === false">
<t t-if="record.is_company.raw_value === true">
<img t-att-src='_s + "/base/static/src/img/company_image.png"' class="oe_kanban_image"/>
</t>
<t t-if="record.is_company.raw_value === false">
<img t-att-src='_s + "/base/static/src/img/avatar.png"' class="oe_kanban_image"/>
</t>
</t>
</a>
<div class="oe_kanban_details">
<h4 class="oe_partner_heading"><a type="open"><field name="name"/></a></h4>
<field name="consumer_id"/>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="action_photobucket_media_tree" model="ir.actions.act_window">
<field name="name">Media</field>
<field name="res_model">photobucket.media</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
</record>
<menuitem id="menu_photobucket_media" action="action_photobucket_media_tree" sequence="30" parent="menu_photobucket"/>
</data>
</openerp>