-
Notifications
You must be signed in to change notification settings - Fork 219
/
Odoo.xml
executable file
·392 lines (392 loc) · 36.1 KB
/
Odoo.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
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
<templateSet group="Odoo">
<template name="odoo_form" value="<record id="view_$res_model$_form" model="ir.ui.view"> <field name="name">view.$object_name$.form</field> <field name="model">$object_name$</field> <field name="arch" type="xml"> <form string=""> <sheet> <group> <field name="name"/> </group> </sheet> </form> </field> </record>" description="Create Form View" toReformat="false" toShortenFQNames="true">
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="object_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_tree" value="<record id="view_$tree_id$_tree" model="ir.ui.view"> <field name="name">view.$object_name$.tree</field> <field name="model">$object_name$</field> <field name="arch" type="xml"> <tree string="$tree_desc$"> <field name="name"/> </tree> </field> </record>" description="Create Tree View" toReformat="false" toShortenFQNames="true">
<variable name="tree_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="object_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="tree_desc" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_data" value="<?xml version="1.0" encoding="utf-8"?> <odoo> <data noupdate="0"> </data> </odoo>" description="Create the main tags" toReformat="false" toShortenFQNames="true">
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_form_inherit" value="<!-- Inherit Form View to Modify it --> <record id="view_inherit_$res_model_name$_form" model="ir.ui.view"> <field name="name">view.inherit.$model$.form</field> <field name="model">$model$</field> <field name="inherit_id" ref="$parent_xml_id$"/> <field name="arch" type="xml"> <!-- position: after|before|replace|attributes|inside --> <xpath expr="//field[@name='$field_name$']" position="$xposition$"> <!-- Add your fields or attributes here --> </xpath> </field> </record>" description="Inherit Existing Form View" toReformat="false" toShortenFQNames="true">
<variable name="res_model_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="parent_xml_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="xposition" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_tree_inherit" value="<record id="view_$tree_id$_inherit_tree" model="ir.ui.view"> <field name="name">view.$object_name$.inherit.tree</field> <field name="model">$object_name$</field> <field name="inherit_id" ref="$parent_xml_id$"/> <field name="arch" type="xml"> <!-- position: after|before|replace|attributes|inside --> <xpath expr="//field[@name='$field_name$']" position="$xposition$"> <!-- Add your fields or attributes here --> </xpath> </field> </record>" description="Inherit Existing Tree View" toReformat="false" toShortenFQNames="true">
<variable name="tree_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="object_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="parent_xml_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="xposition" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_view_action" value="<record id="action_$action_name$_view" model="ir.actions.act_window"> <field name="name">$action_desc$</field> <field name="type">ir.actions.act_window</field> <field name="res_model">$object_name$</field> <field name="view_mode">tree,form</field> <field name="help" type="html"> <p class="oe_view_nocontent_create"> $desc_title$ </p><p> $long_desc$ </p> </field> </record>" description="Create new Action" toReformat="false" toShortenFQNames="true">
<variable name="action_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="action_desc" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="object_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="desc_title" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="long_desc" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_menuitem_root" value="<menuitem id="menu_$menu_id$_root" name="$menu_label$" sequence="$sequence$"/>" description="Create New Menu Item in the Upper bar" toReformat="false" toShortenFQNames="true">
<variable name="menu_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="menu_label" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="sequence" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_menuitem_categ" value="<menuitem id="menu_$menu_id$_categ" name="$menu_label$" parent="$parent_xml_id$" sequence="$sequence$"/>" description="Create New Menu Item for Categroization" toReformat="false" toShortenFQNames="true">
<variable name="menu_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="menu_label" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="parent_xml_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="sequence" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_menuitem_action" value="<menuitem id="menu_$menu_categ_id$_view" name="$menu_label$" parent="$parent_xml_id$" action="$action_xml_id$" sequence="$sequence$"/>" description="Create New Menu Item for Actions" toReformat="false" toShortenFQNames="true">
<variable name="menu_categ_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="menu_label" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="parent_xml_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="action_xml_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="sequence" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_nested_group" value="<group string="$group_label$"> <group> <field name="$field_name1$"/> </group> <group> <field name="$field_name2$"/> </group> </group>" description="Create Nested Groups" toReformat="false" toShortenFQNames="true">
<variable name="group_label" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name1" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name2" expression="" defaultValue="" alwaysStopAt="true" />
</template>
<template name="odoo_domain" value="domain="[('', '=', ), ]"" description="Add domain to your field" toReformat="false" toShortenFQNames="true">
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_object" value="class $class_name$(models.Model): _name = '$object_name$' _rec_name = 'name' _description = '$desc$' $field_name$ = fields.Char(string="$field_label$", required=False, ) " description="Create New Odoo Object" toReformat="false" toShortenFQNames="true">
<variable name="class_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="object_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="desc" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_field_integer" value="$field_name$ = fields.Integer(string="$field_label$", required=False, )" description="Add new field of type Integer" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_field_char" value="$field_name$ = fields.Char(string="$field_label$", required=False, )" description="Add new field of type Char" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_field_text" value="$field_name$ = fields.Text(string="$field_label$\\4111", required=False, )" description="Add new field of type Text" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_field_many2one" value="$field_name$_id = fields.Many2one(comodel_name="$target_relation$", string="$field_label$", required=False, )" description="Add new field of type Many2one" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="target_relation" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_field_one2many" value="$field_name$_ids = fields.One2many(comodel_name="$target_relation$", inverse_name="$inverse_field$", string="$field_label$", required=False, )" description="Add new field of type One2many" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="target_relation" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="inverse_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_field_boolean" value="is_$field_name$ = fields.Boolean(string="$field_label$", )" description="Add new field of type Boolean" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_field_html" value="$field_name$ = fields.Html(string="$field_label$", )" description="Add new field of type HTML" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_field_float" value="$field_name$ = fields.Float(string="$field_label$", required=False, )" description="Add new field of type Float" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_field_date" value="$field_name$ = fields.Date(string="$field_label$", required=False, default=fields.Date.context_today)" description="Add new field of type Date" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_field_datetime" value="$field_name$ = fields.Datetime(string="$field_label$", required=False, default=fields.Datetime.now)" description="Add new field of type DateTime" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_field_selection" value="$field_name$ = fields.Selection(string="$field_label$", selection=[('', ''), ('', ''), ], required=False, )" description="Add new field of type Selection" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_field_many2many" value="$field_name$_ids = fields.Many2many(comodel_name="$target_relation$", relation="$relation$", column1="$col1$", column2="$col2$", string="$field_label$", )" description="Add new field of type Many2many" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="target_relation" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="relation" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="col1" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="col2" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_object_inherit" value="class $class_name$(models.Model): _name = '$object_name$' _inherit = '$object_name$' $field_name$ = fields.Char(string="$field_label$", required=False, ) " description="Inherit/Extend Existing Odoo Object" toReformat="false" toShortenFQNames="true">
<variable name="class_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="object_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_security_category" value="<record id="security_categ_$name$" model="ir.module.category"> <field name="name">$app_name$</field> <field name="sequence" eval="1"/> </record>" description="Add new Security Category" toReformat="false" toShortenFQNames="true">
<variable name="name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="app_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_security_group" value="<record id="group_$name$" model="res.groups"> <field name="name">$desc$</field> <field name="category_id" ref="$security_categ_xml_id$"/> <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/> </record>" description="Create new Group, then assign new permissions" toReformat="false" toShortenFQNames="true">
<variable name="name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="desc" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="security_categ_xml_id" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_security_rule" value="<record id="rule_$rule_id$" model="ir.rule"> <field name="name">$rule_name$</field> <field ref="model_$model_name$" name="model_id"/> <field name="domain_force">[('', '', )]</field> <field name="perm_write" eval="1"/> <field name="perm_create" eval="1"/> <field name="perm_read" eval="1"/> <field name="perm_unlink" eval="1"/> <!-- You can attach this rule to a specific group, Or make it Global --> <field name="groups" eval="[(4, ref('$group_xml_id$'))]"/> <!--<field name="global" eval="1"/> --> </record>" description="Create new Security Rules" toReformat="false" toShortenFQNames="true">
<variable name="rule_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="rule_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="model_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="group_xml_id" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_notebook" value="<notebook> <page string="$page_label$"> <group> <field name="$field_name$"/> </group> </page> </notebook>" description="Add Notebook and a page" toReformat="false" toShortenFQNames="true">
<variable name="page_label" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_page" value="<page string="$page_label$"> <group> <field name="$field_name$"/> </group> </page>" description="Add new page" toReformat="false" toShortenFQNames="true">
<variable name="page_label" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_field_binary" value="$field_name$ = fields.Binary(string="$field_label$", )" description="Add new field of type Binary" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_form_header" value="<header> <button name="$method_name$" string="$string_label$" class="oe_highlight" states="" type="object"/> <field name="state" widget="statusbar" statusbar_visible=""/> </header>" description="Add Form's header with 'state' and buttons" toReformat="false" toShortenFQNames="true">
<variable name="method_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="string_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_form_social" value="<div class="oe_chatter"> <field name="message_follower_ids" widget="mail_followers"/> <field name="message_ids" widget="mail_thread"/> </div>" description="Add Social Messaging and followers." toReformat="false" toShortenFQNames="true">
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_form_title" value="<div class="oe_title"> <label for="name" class="oe_edit_only"/> <h1> <field name="name" placeholder="......"/> </h1> </div>" description="Add title for the form view" toReformat="false" toShortenFQNames="true">
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_method_onchange" value="@api.onchange('$FIELD_NAME$') def _onchange_$FIELD_NAME$(self): pass" description="Add an onchange method" toReformat="false" toShortenFQNames="true">
<variable name="FIELD_NAME" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_method_compute_field" value="@api.one @api.depends('$dependency_field$') def _compute_amount(self): """ @api.depends() should contain all fields that will be used in the calculations. """ pass" description="Add a method to compute the computed fields" toReformat="false" toShortenFQNames="true">
<variable name="dependency_field" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_declare_qweb_reports" value="<!-- QWeb Reports --> <!-- NAME & FILE_NAME should be the same --> <report id="$report_name$_report" model="$res_model$" report_type="qweb-pdf" string="$report_label$" menu="True" name="$report_template_xml_id$" file="$report_template_xml_id$" />" description="Add a declaration for new QWeb reports" toReformat="false" toShortenFQNames="true">
<variable name="report_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="report_label" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="report_template_xml_id" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML_TEXT" value="true" />
</context>
</template>
<template name="odoo_add_qweb_template" value="<template id="$UNIQUE_ID$"> <t t-call="web.html_container"> <t t-call="web.internal_layout"> <!-- <t t-call="web.external_layout"> --> <div class="page"> <h2>TITLE FOR YOUR REPORT</h2> <!-- Build your report here! Do it in awesome way ;) --> </div> </t> </t> </template> " description="Add the main structure of the QWeb Reports" toReformat="false" toShortenFQNames="true">
<variable name="UNIQUE_ID" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_qweb_table" value="<table class="table table-condensed"> <thead> <tr> <th>$HEAD_1$</th> <th class="text-right">$HEAD_2$</th> <th class="text-right">$HEAD_3$</th> <th class="text-right">$HEAD_4$</th> </tr> </thead> <tbody> <tr t-foreach="$OBJECTS$" t-as="$OBJECT$"> <td><span t-esc="$OBJECT$.$field1$"/></td> <td class="text-right"><span t-esc="$OBJECT$.$field2$"/></td> <td class="text-right"><span t-esc="$OBJECT$.$field3$"/></td> <td class="text-right"><span t-esc="$OBJECT$.$field4$"/></td> </tr> </tbody> </table> " description="Add the main structure of the QWeb Tables" toReformat="false" toShortenFQNames="true">
<variable name="HEAD_1" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="HEAD_2" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="HEAD_3" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="HEAD_4" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="OBJECTS" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="OBJECT" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field1" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field2" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field3" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field4" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML_TEXT" value="true" />
</context>
</template>
<template name="odoo_search" value="<record id="view_$model$_search" model="ir.ui.view"> <field name="name">view.$object$.search</field> <field name="model">$object$</field> <field name="arch" type="xml"> <search string="$search_view_label$"> <field name="name" string="string" domain="[('', 'ilike', )]"/> </search> </field> </record>" description="Create Search View" toReformat="false" toShortenFQNames="true">
<variable name="model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="object" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="search_view_label" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_kanban" value=" <record id="view_$res_model$_kanban" model="ir.ui.view"> <field name="name">view.$object_name$.kanban</field> <field name="model">$object_name$</field> <field name="arch" type="xml"> <kanban> <field name="name"/> <templates> <t t-name="kanban-box"> </t> </templates> </kanban> </field> </record> " description="Create Kanban View" toReformat="false" toShortenFQNames="true">
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="object_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_manifest" value="{ 'name': '$short_name$', 'version': '$version$', 'summary': '$short_summary$', 'description': '$long_description$', 'category': '$category$', 'author': '$author$', 'website': '$website$', 'license': '$license$', 'depends': ['base', ], 'data': [''], 'demo': [''], 'installable': True, 'auto_install': False, 'external_dependencies': { 'python': [''], } }" description="Create Odoo project manifest" toReformat="false" toShortenFQNames="true">
<variable name="short_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="version" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="short_summary" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="long_description" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="category" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="author" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="website" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="license" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_import" value="from odoo import api, fields, models " description="Add basic Odoo import for new Odoo versions" toReformat="false" toShortenFQNames="true">
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_xpath" value="<!-- position values: after|before|replace|attributes|inside --> <xpath expr="//field[@name='$field_name$']" position="$position$"> <!-- Add your fields or attributes here --> </xpath>" description="Add the structure of xpath" toReformat="true" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="position" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_method_create" value="@api.model def create(self, values): # Add code here return super($class_name$, self).create(values)" description="Add a method create" toReformat="false" toShortenFQNames="true">
<variable name="class_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_method_write" value="@api.multi def write(self, values): # Add code here return super($ClassName$, self).write(values)" description="Add a method write" toReformat="false" toShortenFQNames="true">
<variable name="ClassName" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="odoo_object_button" value="<button name="$button_method_name$" class="oe_highlight" type="object" string="ObjectButton"/>" description="Add Odoo button" toReformat="false" toShortenFQNames="true">
<variable name="button_method_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_field" value="<field name="name"/>" description="Add commun field on view" toReformat="true" toShortenFQNames="true">
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_field_state" value="<field name="state" widget="statusbar" statusbar_visible=""/>" description="Add state field with progressbar on view" toReformat="true" toShortenFQNames="true">
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_button_box" value="<div class="oe_button_box" name="$button_box_name$"> <button name="toggle_active" type="object" confirm="$confirm_message$" class="oe_stat_button" icon="fa-archive"> <field name="active" widget="boolean_button" options='{"terminology": "archive"}'/> </button> </div>" description="Add Button Box on View" toReformat="false" toShortenFQNames="true">
<variable name="button_box_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="confirm_message" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_action_button" value="<button name="%($action_xml_id$)d" class="oe_highlight" type="action" string="ObjectButton"/>" description="Add Odoo button" toReformat="false" toShortenFQNames="true">
<variable name="action_xml_id" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="odoo_field_monetary" value="$field_name$ = fields.Monetary(string="$field_label$", currency_field="$currency_field$",required=False, )" description="Add new field of type Monetary" toReformat="false" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_label" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="currency_field" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
</templateSet>