forked from openlabs/magento_integration
-
Notifications
You must be signed in to change notification settings - Fork 1
/
magento.xml
355 lines (342 loc) · 15.5 KB
/
magento.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem id="menu_magento" name="Magento"
sequence="70" groups="base.group_user"/>
<menuitem id="menu_magento_config" name="Configuration" sequence="50"
parent="menu_magento" groups="base.group_user"/>
<!--Instance-->
<record id="magento_instance_tree_view" model="ir.ui.view">
<field name="name">magento.instance.tree</field>
<field name="model">magento.instance</field>
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<tree string="Magento Instances">
<field name="name"/>
<field name="url"/>
<field name="active"/>
</tree>
</field>
</record>
<record id="magento_instance_form_view" model="ir.ui.view">
<field name="name">magento.instance.form</field>
<field name="model">magento.instance</field>
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<form string="Magento Instance" version="7.0">
<header>
<button name="%(action_magento_test_connection)d"
type='action' class="oe_highlight" string='Test Connection'/>
<button name="%(action_magento_import_websites)d"
type='action' class="oe_highlight" string='Import Websites'/>
</header>
<sheet>
<div class="oe_title">
<div class="oe_edit_only">
<label for="name" string="Name"/>
</div>
<h1>
<field name="name"/>
</h1>
<separator colspan="4"/>
<label for="company"/>
<h3><field name="company"/></h3>
<label for="active"/>
<h3><field name="active"/></h3>
</div>
<div class="oe_clear"/>
<div class="oe_horizontal_separator oe_clear ">
API Settings
</div>
<label for="url"/>
<h3><field name="url" colspan="4"/></h3>
<group>
<group>
<label for="api_user"/>
<h3><field name="api_user"/></h3>
</group>
<group>
<label for="api_key"/>
<h3><field name="api_key"/></h3>
</group>
<group>
<label for="order_prefix"/>
<h3><field name="order_prefix"/></h3>
</group>
</group>
<notebook>
<page string="Websites" groups="base.group_user">
<h3>
<field name="websites"/>
</h3>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="magento_instances" model="ir.actions.act_window">
<field name="name">Magento Instances</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">magento.instance</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="magento_instances" id="menu_instances"
parent="menu_magento_config" sequence="5" groups="base.group_user"/>
<!-- Website -->
<record id="instance_website_tree_view" model="ir.ui.view">
<field name="name">magento.instance.website.tree</field>
<field name="model">magento.instance.website</field>
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<tree string="Instance Website">
<field name="name"/>
<field name="code"/>
<field name="instance"/>
</tree>
</field>
</record>
<record id="instance_website_form_view" model="ir.ui.view">
<field name="name">magento.instance.website.form</field>
<field name="model">magento.instance.website</field>
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<form string="Website" version="7.0">
<header>
<button name="%(action_magento_import_catalog)d"
type='action' class="oe_highlight" string='Import Catalog'/>
</header>
<sheet>
<group>
<group>
<h2>
<label for="name" string="Name"/>
</h2>
</group>
<group>
<h2>
<label for="code"/>
</h2>
</group>
<group>
<h1>
<field name="name"/>
</h1>
</group>
<group>
<h1>
<field name="code"/>
</h1>
</group>
<group>
<label for="instance"/>
<field name="instance"/>
<label for="company"/>
<field name="company"/>
</group>
</group>
<notebook>
<page string="Stores" groups="base.group_user">
<h3>
<field name="stores"/>
</h3>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="instance_website" model="ir.actions.act_window">
<field name="name">Website</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">magento.instance.website</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="instance_website" id="menu_websites"
parent="menu_magento_config" sequence="10"
groups="base.group_user"/>
<!--Store-->
<record id="website_store_tree_view" model="ir.ui.view">
<field name="name">magento.website.store.tree</field>
<field name="model">magento.website.store</field>
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<tree string="Website Store">
<field name="name"/>
<field name="website"/>
</tree>
</field>
</record>
<record id="website_store_form_view" model="ir.ui.view">
<field name="name">magento.website.store.form</field>
<field name="model">magento.website.store</field>
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<form string="Website Store" version="7.0" col="6">
<sheet>
<group>
<group>
<h2>
<label for="name" string="Name"/>
</h2>
</group>
<div class="oe_clear"/>
<group>
<h1>
<field name="name"/>
</h1>
</group>
<div class="oe_clear"/>
<group>
<label for="website"/>
<h3>
<field name="website" colspan="2"/>
</h3>
</group>
<group>
<label for="instance"/>
<h3>
<field name="instance" colspan="2"/>
</h3>
</group>
<group>
<label for="company"/>
<h3>
<field name="company" colspan="2"/>
</h3>
</group>
<group>
<label for="shop"/>
<h3>
<field name="shop" colspan="2"/>
</h3>
</group>
</group>
<notebook>
<page string="Store Views" groups="base.group_user">
<h3>
<field name="store_views" readonly="1"/>
</h3>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="website_store" model="ir.actions.act_window">
<field name="name">Website Store</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">magento.website.store</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="website_store" id="menu_stores"
parent="menu_magento_config" sequence="15"
groups="base.group_user"/>
<!--Store view-->
<record id="store_view_tree_view" model="ir.ui.view">
<field name="name">magento.store.store_view.tree</field>
<field name="model">magento.store.store_view</field>
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<tree string="Store View">
<field name="name"/>
<field name="code"/>
<field name="store"/>
</tree>
</field>
</record>
<record id="store_view_form_view" model="ir.ui.view">
<field name="name">magento.store.store_view.form</field>
<field name="model">magento.store.store_view</field>
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<form string="Store View" version="7.0">
<header>
<button name="%(action_magento_import_orders)d"
type='action' class="oe_highlight" string='Import Orders'/>
<button name="%(action_magento_export_orders)d"
type='action' class="oe_highlight" string='Export Orders'/>
</header>
<sheet>
<group>
<group>
<h2><label for="name" string="Name"/></h2>
</group>
<group>
<h2><label for="code" string="Code"/></h2>
</group>
<group>
<h1>
<field name="name"/>
</h1>
</group>
<group>
<h1>
<field name="code"/>
</h1>
</group>
<group>
<label for="store"/>
<h3><field name="store"/></h3>
</group>
<group>
<label for="instance"/>
<h3><field name="instance"/></h3>
</group>
<group>
<label for="website"/>
<h3><field name="website"/></h3>
</group>
<group>
<label for="company"/>
<h3><field name="company"/></h3>
</group>
<group>
<label for="last_order_import_time"/>
<h3><field name="last_order_import_time"/></h3>
</group>
<group>
<label for="last_order_export_time"/>
<h3><field name="last_order_export_time"/></h3>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="store_view" model="ir.actions.act_window">
<field name="name">Store View</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">magento.store.store_view</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="store_view" id="menu_store_views"
parent="menu_magento_config" sequence="20"
groups="base.group_user"/>
<!-- Cron -->
<record model="ir.cron" id="ir_cron_get_sale_orders">
<field name="name">Import Sales from Magento</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False"/>
<field name="model" eval="'magento.store.store_view'"/>
<field name="function" eval="'get_orders'"/>
<field name="args" eval="'()'"/>
</record>
<record model="ir.cron" id="ir_cron_export_sale_orders">
<field name="name">Export Sales Status to Magento</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False"/>
<field name="model" eval="'magento.store.store_view'"/>
<field name="function" eval="'export_orders'"/>
<field name="args" eval="'()'"/>
</record>
</data>
</openerp>