-
Notifications
You must be signed in to change notification settings - Fork 219
/
Flectra.xml
469 lines (469 loc) · 47.4 KB
/
Flectra.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
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
<templateSet group="Flectra">
<template name="flectra_form" value="<record id="view_$res_id$_form" model="ir.ui.view"> <field name="name">view.$res_model$.form</field> <field name="model">$res_model$</field> <field name="arch" type="xml"> <form string="$string$"> <sheet> <group> <field name="name"/> </group> </sheet> </form> </field> </record>" description="Create Form View" toReformat="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="string" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_tree" value="<record id="view_$res_id$_tree" model="ir.ui.view"> <field name="name">view.$res_model$.tree</field> <field name="model">$res_model$</field> <field name="arch" type="xml"> <tree string="$string$"> <field name="name"/> </tree> </field> </record>" description="Create Tree View" toReformat="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="string" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_data" value="<?xml version="1.0" encoding="utf-8"?> <flectra> <data> </data> </flectra>" description="Create the main tags" toReformat="true" toShortenFQNames="true">
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_form_inherit" value="<!-- Inherit Form View to Modify it --> <record id="view_$res_id$_form_inherit" model="ir.ui.view"> <field name="name">view.$res_model$.form.inherit</field> <field name="model">$res_model$</field> <field name="inherit_id" ref="$inherit_view_id$"/> <field name="arch" type="xml"> <xpath expr="$xpath$" position="$position$"> <!-- Add your fields or attributes here --> </xpath> </field> </record>" description="Inherit Existing Form View" toReformat="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="inherit_view_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="xpath" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="position" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_tree_inherit" value="<record id="view_$res_id$_tree_inherit" model="ir.ui.view"> <field name="name">view.$res_model$.tree.inherit</field> <field name="model">$res_model$</field> <field name="inherit_id" ref="$inherit_view_id$"/> <field name="arch" type="xml"> <xpath expr="$xpath$" position="$position$"> <!-- Add new fields here --> </xpath> </field> </record>" description="Inherit Existing Tree View" toReformat="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="inherit_view_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="xpath" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="position" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_view_action" value="<record id="action_$res_id$" model="ir.actions.act_window"> <field name="name">$res_name$</field> <field name="type">ir.actions.act_window</field> <field name="res_model">$res_model$</field> <field name="view_mode">tree,form</field> <field name="help" type="html"> <p class="oe_view_nocontent_create"> <!-- Add Text Here --> </p><p> <!-- More details about what a user can do with this object will be OK --> </p> </field> </record>" description="Create new Action" toReformat="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_menuitem_root" value="<!-- This Menu Item will appear in the Upper bar, That's why It needs NO parent or action --> <menuitem id="menu_$menu_id$_root" name="$menu_name$" sequence="$seq_num$"/>" description="Create New Menu Item in the Upper bar" toReformat="true" toShortenFQNames="true">
<variable name="menu_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="menu_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="seq_num" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_menuitem_categ" value="<!-- This Menu Item Must have a parent --> <menuitem id="menu_$menu_id$_categ" name="$menu_name$" parent="$parent_menu_id$" sequence="$seq_num$"/>" description="Create New Menu Item for Categroization" toReformat="true" toShortenFQNames="true">
<variable name="menu_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="menu_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="parent_menu_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="seq_num" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_menuitem_action" value="<!-- This Menu Item must have a parent and an action --> <menuitem id="menu_$menu_id$_action" name="$menu_name$" parent="$parent_menu_id$" action="$action_id$" sequence="$seq_num$"/>" description="Create New Menu Item for Actions" toReformat="true" toShortenFQNames="true">
<variable name="menu_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="menu_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="parent_menu_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="action_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="seq_num" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_group" value="<group> <field name=""/> </group> " description="Create Group" toReformat="true" toShortenFQNames="true">
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_nested_group" value="<group string=""> <group> <field name=""/> </group> <group> <field name=""/> </group> </group>" description="Create Nested Groups" toReformat="true" toShortenFQNames="true">
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_domain" value="domain="[('$field_name$', '$operator$', $values$), ]"" description="Add domain to your field" toReformat="true" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="operator" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="values" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_security_category" value="<record id="module_$module_name$" model="ir.module.category"> <field name="name">$name$</field> <field name="$sequence$" eval="1"/> </record>" description="Add new Security Category" toReformat="true" toShortenFQNames="true">
<variable name="module_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="sequence" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_security_group" value="<record id="group_$group_id$" model="res.groups"> <field name="name">$group_name$</field> <field name="category_id" ref="$categ_id$"/> <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/> </record>" description="Create new Group, then assign new permissions" toReformat="true" toShortenFQNames="true">
<variable name="group_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="group_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="categ_id" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_security_rule" value="<record id="$rule_id$" model="ir.rule"> <field name="name">$rule_name$</field> <field ref="$res_model$" 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_id'))]"/> <!--<field name="global" eval="1"/> --> </record>" description="Create new Security Rules" toReformat="true" toShortenFQNames="true">
<variable name="rule_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="rule_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_notebook" value="<notebook> <page string="$string$"> <group> <field name="$field_name$"/> </group> </page> </notebook>" description="Add Notebook and a page" toReformat="true" toShortenFQNames="true">
<variable name="string" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_page" value="<page string="$string$"> <group> <field name="$field_name$"/> </group> </page>" description="Add new page" toReformat="true" toShortenFQNames="true">
<variable name="string" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_form_header" value="<header> <button name="action_$action_button$" string="$string$" class="oe_highlight" states="$states$" type="$type$"/> <field name="state" widget="statusbar" statusbar_visible="$visibility$" statusbar_colors="{'KEY_IS_STATE':'VALUE_IS_COLOR'}"/> </header>" description="Add Form's header with 'state' and buttons" toReformat="true" toShortenFQNames="true">
<variable name="action_button" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="string" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="states" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="type" expression="" defaultValue="object" alwaysStopAt="true" />
<variable name="visibility" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_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="true" toShortenFQNames="true">
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_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="true" toShortenFQNames="true">
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_declare_qweb_reports" value="<!-- QWeb Reports --> <!-- NAME & FILE_NAME should be the same --> <report id="report_$res_id$_view" model="$res_model$" report_type="qweb-pdf" string="$label$" name="$name$" file="$file_name$" />" description="Add a declaration for new QWeb reports" toReformat="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="label" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="file_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML_TEXT" value="true" />
</context>
</template>
<template name="flectra_add_qweb_template" value="<template id="template_$res_id$_view"> <t t-call="report.html_container"> <t t-call="report.internal_layout"> <!-- <t t-call="report.external_layout"> --> <div class="page"> <h2>$report_title$</h2> <!-- Build your report here! Do it in awesome way ;) --> </div> </t> </t> </template> " description="Add the main structure of the QWeb Reports" toReformat="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="report_title" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_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="o.OBJECTS" t-as="OBJECT"> <t t-if="len(taxline['level']) > 5"> <t t-set="style" t-value="'font-weight:normal;'"/> </t> <t t-if="not len(taxline['level']) > 5"> <t t-set="style" t-value="'font-weight:bold;'"/> </t> <td> <span t-att-style="style" t-esc="taxline['level']" style="color:white;"/> <span t-att-style="style" t-if="taxline['code']" t-esc="taxline['code']"/> <span t-att-style="style" t-esc="taxline['name']"/> </td> <td class="text-right"><span t-att-style="style" t-esc="taxline['debit']"/></td> <td class="text-right"><span t-att-style="style" t-esc="taxline['credit']"/></td> <td class="text-right"> <span t-att-style="style" t-esc="formatLang(taxline['tax_amount'], currency_obj=res_company.currency_id)"/> </td> </tr> </tbody> </table> " description="Add the main structure of the QWeb Tables" toReformat="true" toShortenFQNames="true">
<context>
<option name="XML_TEXT" value="true" />
</context>
</template>
<template name="flectra_search" value="<record id="view_$res_id$_search" model="ir.ui.view"> <field name="name">view.$res_model$.search</field> <field name="model">$res_model$</field> <field name="arch" type="xml"> <search string="$string$"> <field name="name" string="" domain="[()]"/> </search> </field> </record>" description="Create Search View" toReformat="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="string" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_kanban" value="<record id="view_$res_id$_kanban" model="ir.ui.view"> <field name="name">view.$res_model$.kandan</field> <field name="model">$res_model$</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="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_xpath" value="<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="flectra_xpath_attributes" value="<xpath expr="//field[@name='$field_name$']" position="$attributes$"> <attribute name="required">1</attribute> <attribute name="readonly">1</attribute> </xpath>" description="Add the structure of xpath with attributes" toReformat="true" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="attributes" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_button" value="<button name="action_$action_button$" type="$type$" string="$field_name$"/>" description="Add Flectra button" toReformat="true" toShortenFQNames="true">
<variable name="action_button" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="type" expression="" defaultValue="object" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_field" value="<field name="$field_name$"/>" description="Add commun field on view" toReformat="true" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_field_state" value="<field name="state" widget="statusbar" statusbar_visible="$visibility$"/>" description="Add state field with progressbar on view" toReformat="true" toShortenFQNames="true">
<variable name="visibility" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_button_box" value="<div class="oe_button_box" name="expense_button_box"> <button name="toggle_active" type="object" confirm="(Un)archiving a project automatically (un)archives its tasks and issues. Do you want to proceed?" 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="true" toShortenFQNames="true">
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_class" value="class $class_name$(models.Model): _name = '$model_name$' _rec_name = 'name' _description = '$description$' name = fields.Char() " description="Create New Flectra Class" toReformat="true" toShortenFQNames="true">
<variable name="class_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="model_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="description" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_integer" value="$new_field$ = fields.Integer(string="$field_name$", required=False)" description="Add new field of type Integer" toReformat="true" toShortenFQNames="true">
<variable name="new_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_char" value="$new_field$ = fields.Char(string="$field_name$", required=False)" description="Add new field of type Char" toReformat="true" toShortenFQNames="true">
<variable name="new_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_text" value="$new_field$ = fields.Text(string="$field_name$", required=False)" description="Add new field of type Text" toReformat="true" toShortenFQNames="true">
<variable name="new_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_many2one" value="$new_field$ = fields.Many2one(comodel_name="$co_model$", string="$field_name$", required=False)" description="Add new field of type Many2one" toReformat="true" toShortenFQNames="true">
<variable name="new_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="co_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_one2many" value="$new_field$ = fields.One2many(comodel_name="$co_model$", inverse_name="$inv_name$", string="$field_name$", required=False)" description="Add new field of type One2many" toReformat="true" toShortenFQNames="true">
<variable name="new_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="co_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="inv_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_boolean" value="$new_field$ = fields.Boolean(string="$field_name$")" description="Add new field of type Boolean" toReformat="true" toShortenFQNames="true">
<variable name="new_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_html" value="$new_field$ = fields.HTML(string="$field_name$")" description="Add new field of type HTML" toReformat="true" toShortenFQNames="true">
<variable name="new_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_float" value="$new_field$ = fields.Float(string="$field_name$", required=False)" description="Add new field of type Float" toReformat="true" toShortenFQNames="true">
<variable name="new_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_date" value="$new_field$ = fields.Date(string="$field_name$", required=False)" description="Add new field of type Date" toReformat="true" toShortenFQNames="true">
<variable name="new_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_datetime" value="$new_field$ = fields.Datetime(string="$field_name$", required=False)" description="Add new field of type DateTime" toReformat="true" toShortenFQNames="true">
<variable name="new_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_selection" value="state = fields.Selection(string="$field_name$", selection=[('', ''), ('', ''), ], required=False)" description="Add new field of type Selection" toReformat="true" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_many2many" value="$new_field$ = fields.Many2many(comodel_name="$co_model$", relation="$rel_model$", column1="$col_1$", column2="$col_2$", string="$field_name$")" description="Add new field of type Many2many" toReformat="true" toShortenFQNames="true">
<variable name="new_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="co_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="rel_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="col_1" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="col_2" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_class_inherit" value="class $class$(models.Model): _name = '$model_name$' _inherit = '$inherit_model$' name = fields.Char() " description="Inherit/Extend Existing Flectra Object" toReformat="true" toShortenFQNames="true">
<variable name="class" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="model_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="inherit_model" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_field_binary" value="$new_field$ = fields.Binary(string="$field_name$")" description="Add new field of type Binary" toReformat="true" toShortenFQNames="true">
<variable name="new_field" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_method_onchange" value="@api.onchange('$field_name$') def _onchange_$field_name$(self): pass" description="Add an onchange method" toReformat="true" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_method_compute_field" value="@api.one @api.depends('$field_name$') def _compute_$field_name$(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="true" toShortenFQNames="true">
<variable name="field_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_manifest" value="{ 'name': '$app_name$', 'summary': '$app_summary$', 'version': '1.0', 'category': 'Custom', 'author': 'FlectraHQ', 'website': 'https://flectrahq.com', 'license': 'LGPL-3', 'depends': [], 'data': [], 'demo': [], 'installable': True, 'auto_install': False, 'application': True }" description="Create Flectra project manifest" toReformat="true" toShortenFQNames="true">
<variable name="app_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="app_summary" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_import" value="from flectra import api, fields, models " description="Add basic Flectra import for new Flectra versions" toReformat="true" toShortenFQNames="true">
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_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="true" toShortenFQNames="true">
<variable name="class_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_method_write" value="@api.multi def write(self, values): # Add code here return super($class_name$, self).write(values)" description="Add a method write" toReformat="true" toShortenFQNames="true">
<variable name="class_name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_complete_view" value="<record id="view_$res_id$_form" model="ir.ui.view"> <field name="name">view.$res_model$.form</field> <field name="model">$res_model$</field> <field name="arch" type="xml"> <form string="$string$"> <sheet> <group> <field name="name"/> </group> </sheet> </form> </field> </record> <record id="view_$res_id$_tree" model="ir.ui.view"> <field name="name">view.$res_model$.tree</field> <field name="model">$res_model$</field> <field name="arch" type="xml"> <tree string="$string$"> <field name="name"/> </tree> </field> </record> <record id="view_$res_id$_search" model="ir.ui.view"> <field name="name">view.$res_model$.search</field> <field name="model">$res_model$</field> <field name="arch" type="xml"> <search string="$string$"> <field name="name" string="" domain="[()]"/> </search> </field> </record> <record id="view_$res_id$_kanban" model="ir.ui.view"> <field name="name">view.$res_model$.kandan</field> <field name="model">$res_model$</field> <field name="arch" type="xml"> <kanban> <field name="name"/> <templates> <t t-name="kanban-box"> </t> </templates> </kanban> </field> </record> <record id="action_$res_id$" model="ir.actions.act_window"> <field name="name">$string$</field> <field name="type">ir.actions.act_window</field> <field name="res_model">$res_model$</field> <field name="view_mode">tree,form</field> <field name="help" type="html"> <p class="oe_view_nocontent_create"> <!-- Add Text Here --> </p><p> <!-- More details about what a user can do with this object will be OK --> </p> </field> </record> <!-- This Menu Item will appear in the Upper bar, That's why It needs NO parent or action --> <menuitem id="menu_$res_id$_root" name="$menu_name$" sequence="$seq_num$"/> <!-- This Menu Item Must have a parent --> <menuitem id="menu_$res_id$_sub" name="$menu_categ_name$" parent="menu_$res_id$_root" sequence="$seq_categ_num$"/> <!-- This Menu Item must have a parent and an action --> <menuitem id="menu_$res_id$_main" name="$menu_action_name$" parent="menu_$res_id$_sub" action="action_$res_id$" sequence="$seq_action_num$"/> " description="Create Form View" toReformat="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="string" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="menu_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="seq_num" expression="" defaultValue=""16"" alwaysStopAt="true" />
<variable name="menu_categ_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="seq_categ_num" expression="" defaultValue=""16"" alwaysStopAt="true" />
<variable name="menu_action_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="seq_action_num" expression="" defaultValue=""16"" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_sequence" value="<record id="seq_$module_name$" model="ir.sequence"> <field name="name">$name$</field> <field name="code">$code$</field> <field name="prefix">$prefix$</field> <field name="suffix">$suffix$</field> <field name="padding">$padding$</field> <field name="number_increment">$number_increment$</field> <field name="number_next_actual">$number_next_actual$</field> </record>" description="Define Sequence" toReformat="true" toShortenFQNames="true">
<variable name="module_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="code" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="prefix" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="suffix" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="padding" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="number_increment" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="number_next_actual" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_email_template" value="<record id="email_template_$eid$" model="mail.template"> <field name="name">$name$</field> <field name="email_from">$email_from$</field> <field name="subject">$subject$</field> <field name="partner_to">$partner_to$</field> <field name="model_id" ref="$module_name$.model_$model_name$"/> <field name="lang">${object.partner_id.lang}</field> <field name="body_html">$body_html$</field> </record>" description="Define Sequence" toReformat="true" toShortenFQNames="true">
<variable name="eid" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="email_from" expression="" defaultValue=""${(object.user_id.email and '%s <%s>' % (object.user_id.name, object.user_id.email) or '')|safe}"" alwaysStopAt="true" />
<variable name="subject" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="partner_to" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="module_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="model_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="body_html" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_calendar" value="<record id="view_$res_id$_calendar" model="ir.ui.view"> <field name="name">view.$res_model$.calendar</field> <field name="model">$res_model$</field> <field name="arch" type="xml"> <calendar string="$string$" date_start="$date_start$" date_delay="$date_delay$"> <field name="name"/> </calendar> </field> </record>" description="Create Calendar View" toReformat="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="string" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="date_start" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="date_delay" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_graph" value="<record id="view_$res_id$_graph" model="ir.ui.view"> <field name="name">view.$res_model$.graph</field> <field name="model">$res_model$</field> <field name="arch" type="xml"> <graph string="$string$" type="$type$" orientation="$orientation$"> <field name="name"/> </graph> </field> </record>" description="Create Graph View" toReformat="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="string" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="type" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="orientation" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_pivot" value="<record id="view_$res_id$_pivot" model="ir.ui.view"> <field name="name">view.$res_model$.pivot</field> <field name="model">$res_model$</field> <field name="arch" type="xml"> <pivot string="$string$"> <field name="name"/> </pivot> </field> </record>" description="Create Pivot View" toReformat="true" toShortenFQNames="true">
<variable name="res_id" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="res_model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="string" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="XML" value="true" />
</context>
</template>
<template name="flectra_class_wizard" value="class $class_code$(models.TransientModel): _name = '$class_name$' _description = '$description$' " description="Wizard Class" toReformat="true" toShortenFQNames="true">
<variable name="class_code" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="class_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="description" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_class_report" value="class $class_code$(models.AbstractModel): _name = 'report.$module_name$.$report_name$' _description = '$description$' " description="Report Class" toReformat="true" toShortenFQNames="true">
<variable name="class_code" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="module_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="report_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="description" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Python" value="true" />
</context>
</template>
<template name="flectra_method_report_value" value="@api.model def get_report_values(self, docids, data=None): # Add code here pass" description="Design Report Data" toReformat="true" toShortenFQNames="true">
<context>
<option name="Python" value="true" />
</context>
</template>
</templateSet>