generated from IWANABETHATGUY/tower-lsp-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathodoo.rng
1765 lines (1722 loc) · 48.9 KB
/
odoo.rng
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
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">
<define name="env">
<optional>
<attribute name="uid">
<a:documentation>
The ID of the user that creates this record, or performs this action.
</a:documentation>
</attribute>
</optional>
<optional>
<attribute name="context">
<a:documentation>
A dictionary of key-value pairs that will be used to evaluate the expressions in this file.
</a:documentation>
</attribute>
</optional>
</define>
<define name="views">
<data type="string">
<param name="pattern">([a-z]+(,[a-z]+)*)?</param>
</data>
</define>
<define name="oe_class">
<attribute name="class">
<choice>
<text/>
<value>oe_inline</value>
<value>oe_left</value>
<value>oe_right</value>
<value>oe_read_only</value>
<value>oe_edit_only</value>
<value>oe_avatar</value>
<value>oe_stat_button</value>
<value>oe_chatter</value>
<value>o_attachment_preview</value>
<value>oe_title</value>
</choice>
<a:documentation xml:space="preserve">
HTML classes. Some helper classes starting with `oe_` provide
useful styling for common use cases.<br/>
- `oe_chatter`: Used with `<div>` to define a chatter widget.
The model must also inherit the `mail.thread` mixin.<br/>
- `o_attachment_preview`: Used with an empty `<div>` to define a preview widget for attachments.<br/>
- `oe_stat_button`: Used to style a "smart button" which displays a count of related records
and opens a new action when clicked.
</a:documentation>
</attribute>
</define>
<define name="decoration">
<choice>
<attribute name="decoration-info" a:defaultValue="False">
<a:documentation>
Apply a blue decoration to matching records. Takes a Python expression.
</a:documentation>
</attribute>
<attribute name="decoration-warning" a:defaultValue="False">
<a:documentation>
Apply a yellow decoration to matching records. Takes a Python expression.
</a:documentation>
</attribute>
<attribute name="decoration-danger" a:defaultValue="False">
<a:documentation>
Apply a red decoration to matching records. Takes a Python expression.
</a:documentation>
</attribute>
<attribute name="decoration-muted" a:defaultValue="False">
<a:documentation>
Apply a muted decoration to matching records. Takes a Python expression.
</a:documentation>
</attribute>
<attribute name="decoration-primary" a:defaultValue="False">
<a:documentation>
Apply a prominent decoration to matching records. Takes a Python expression.
</a:documentation>
</attribute>
<attribute name="decoration-success" a:defaultValue="False">
<a:documentation>
Apply a green decoration to matching records. Takes a Python expression.
</a:documentation>
</attribute>
<attribute name="decoration-bf" a:defaultValue="False">
<a:documentation>
Apply **bold text** to matching records. Takes a Python expression.
</a:documentation>
</attribute>
<attribute name="decoration-it" a:defaultValue="False">
<a:documentation>
Apply *italic text* to matching records. Takes a Python expression.
</a:documentation>
</attribute>
</choice>
</define>
<define name="tree_button">
<element name="button">
<a:documentation>
A button that will be displayed in the view.
</a:documentation>
<ref name="tree_button_attrs"/>
</element>
</define>
<define name="tree">
<element name="tree">
<a:documentation xml:space="preserve">
Define a list view. <br/>
See https://www.odoo.com/documentation/latest/developer/reference/user_interface/view_architectures.html#list
</a:documentation>
<zeroOrMore>
<choice>
<ref name="decoration"/>
<ref name="view_attrs"/>
<attribute name="import" a:defaultValue="True">
<a:documentation>
Disable/enable record deletion through the **Action** dropdown.
</a:documentation>
</attribute>
<attribute name="export_xlsx" a:defaultValue="True">
<a:documentation>
Disable/enable record exporting on this view.
</a:documentation>
</attribute>
<attribute name="editable">
<choice>
<value>top</value>
<value>bottom</value>
</choice>
<a:documentation>
Allow in-place record editing, and specifies whether new records
are inserted at the top or bottom of the list.
</a:documentation>
</attribute>
<attribute name="multi_edit">
<value>1</value>
<a:documentation>
Allow updating multiple records' fields to the same value.
</a:documentation>
</attribute>
<attribute name="open_form_view" a:defaultValue="False">
<a:documentation>
Display a button at each row's end to open the form view.
</a:documentation>
</attribute>
<attribute name="default_group_by">
<a:documentation>
Default field to group by, if none is specified on the action or the search filters.
</a:documentation>
</attribute>
<attribute name="default_order">
<a:documentation>
Comma-separated list of fields to order records, overriding the model's default `_order`.
To sort a field in decreasing order, specify `$field desc`.
</a:documentation>
</attribute>
<attribute name="limit" a:defaultValue="80">
<data type="nonNegativeInteger"/>
<a:documentation>
The default size of a page.
</a:documentation>
</attribute>
<attribute name="groups_limit" a:defaultValue="80">
<data type="nonNegativeInteger"/>
<a:documentation>
The default number of groups.
</a:documentation>
</attribute>
<attribute name="expand" a:defaultValue="False">
<a:documentation>
Whether to expand the first level of groups by default.
</a:documentation>
</attribute>
<attribute name="sample" a:defaultValue="False">
<a:documentation>
Populate the view with sample data if it's empty.
</a:documentation>
</attribute>
<ref name="tree_field"/>
<ref name="tree_button"/>
<element name="groupby">
<a:documentation>
Define a group-by header for `Many2one` fields.
</a:documentation>
<attribute name="name">
<a:documentation>
The name of a `Many2one` field by which to group records.
</a:documentation>
</attribute>
<oneOrMore>
<choice>
<ref name="tree_field"/>
<ref name="tree_button"/>
</choice>
</oneOrMore>
</element>
<element name="header">
<a:documentation>
A header displayed above the list view.
</a:documentation>
<oneOrMore>
<element name="button">
<a:documentation>
A button inside the header. Accepts the same attributes as button columns.
</a:documentation>
<ref name="tree_button_attrs"/>
<optional>
<attribute name="display">
<value>always</value>
<a:documentation>
Show this button even if no records are selected.
</a:documentation>
</attribute>
</optional>
</element>
</oneOrMore>
</element>
<element name="control">
<a:documentation xml:space="preserve">
Create a "control row" that accepts different ways to create records
a la Sales Order's "Add a section", "Add a note" etc.<br/>
Overrides the default "Add a line" button if specified.
</a:documentation>
<oneOrMore>
<choice>
<element name="create">
<a:documentation>
A button to create a new record, with optional context.
</a:documentation>
<attribute name="string" a:defaultValue="Add a line">
<a:documentation>
The text of the button.
</a:documentation>
</attribute>
<optional>
<attribute name="context" a:defaultValue="{}">
<a:documentation xml:space="preserve">
Additional context to pass before creating a record.<br/>
Useful for passing default values i.e. `{"default_field": ..}`
</a:documentation>
</attribute>
</optional>
</element>
<element name="button">
<a:documentation>
A button inside the control row. Accepts the same attributes as button columns.
</a:documentation>
<ref name="tree_button_attrs"/>
</element>
</choice>
</oneOrMore>
</element>
</choice>
</zeroOrMore>
</element>
</define>
<define name="form">
<element name="form">
<a:documentation xml:space="preserve">
Define a form view. <br/>
See https://www.odoo.com/documentation/latest/developer/reference/user_interface/view_architectures.html#form
</a:documentation>
<oneOrMore>
<choice>
<ref name="view_attrs"/>
<ref name="form_children"/>
<attribute name="duplicate" a:defaultValue="True">
<a:documentation>
Allow duplicating records through the **Action** dropdown. Takes a Python expression.
</a:documentation>
</attribute>
<attribute name="disable_autofocus" a:defaultValue="False">
<a:documentation>
Disable autofocus on the first field. Takes a Python expression.
</a:documentation>
</attribute>
</choice>
</oneOrMore>
</element>
</define>
<define name="view_attrs">
<choice>
<attribute name="string">
<a:documentation>
The title of the list view, displayed if corresponding action has no name and target is `new`.
</a:documentation>
</attribute>
<attribute name="create" a:defaultValue="True">
<a:documentation>
Disable/enable record creation on this view.
</a:documentation>
</attribute>
<attribute name="edit" a:defaultValue="True">
<a:documentation>
Disable/enable record editing on this view.
</a:documentation>
</attribute>
<attribute name="delete" a:defaultValue="True">
<a:documentation>
Disable/enable record deletion through the **Action** dropdown.
</a:documentation>
</attribute>
<attribute name="js_class">
<a:documentation>
The name of the Javascript component class used instead of the form view.
Corresponds to views registered using `registry.category("views").add("...")`.
</a:documentation>
</attribute>
<attribute name="banner_route">
<a:documentation>
A route to fetch a banner HTML from. The corresponding handler must return a JSON
response in the shape of `{"html": ".."}`
</a:documentation>
</attribute>
</choice>
</define>
<define name="form_children">
<choice>
<text/>
<ref name="form_field"/>
<ref name="form_button"/>
<ref name="sheet"/>
<ref name="page"/>
<ref name="group"/>
<ref name="notebook"/>
<element name="div">
<zeroOrMore>
<choice>
<ref name="invisible"/>
<ref name="groups"/>
<ref name="oe_class"/>
<attribute name="name">
<choice>
<text/>
<value>button_box</value>
</choice>
<a:documentation xml:space="preserve">
Names for semantic `<div>` elements.<br/>
- `button_box`: A row for smart buttons, usually at the top of the form.
</a:documentation>
</attribute>
<attribute>
<anyName/>
</attribute>
<ref name="form_children"/>
</choice>
</zeroOrMore>
</element>
<element name="span">
<ref name="form_html"/>
</element>
<element name="p">
<ref name="form_html"/>
</element>
<element name="header">
<ref name="form_html"/>
</element>
<element>
<anyName>
<except>
<name>field</name>
<name>sheet</name>
<name>page</name>
<name>group</name>
<name>notebook</name>
</except>
</anyName>
<ref name="form_html"/>
</element>
</choice>
</define>
<define name="form_html">
<zeroOrMore>
<choice>
<ref name="invisible"/>
<ref name="groups"/>
<ref name="oe_class"/>
<attribute>
<anyName/>
</attribute>
<ref name="form_children"/>
</choice>
</zeroOrMore>
</define>
<define name="sheet">
<element name="sheet">
<a:documentation>
Provides a responsive layout for fields and markup, as a direct child of a
`<form>` element. Typically contains `group` elements.
</a:documentation>
<zeroOrMore>
<ref name="form_children"/>
</zeroOrMore>
</element>
</define>
<define name="page">
<element name="page">
<a:documentation>
A page in a `<notebook>`. Visually represented as a folder tab.
</a:documentation>
<zeroOrMore>
<choice>
<ref name="form_children"/>
<ref name="invisible"/>
<attribute name="string">
<a:documentation>
The title of the page.
</a:documentation>
</attribute>
</choice>
</zeroOrMore>
</element>
</define>
<define name="group">
<element name="group">
<a:documentation>
A grouping of field elements.
</a:documentation>
<zeroOrMore>
<choice>
<ref name="form_children"/>
<ref name="invisible"/>
<attribute name="string">
<a:documentation>
The title of the group.
</a:documentation>
</attribute>
<attribute name="col" a:defaultValue="2">
<data type="nonNegativeInteger"/>
<a:documentation>
The number of columns in this group.
</a:documentation>
</attribute>
<attribute name="colspan" a:defaultValue="1">
<data type="nonNegativeInteger"/>
<a:documentation>
How many columns should child elements take.
</a:documentation>
</attribute>
<attribute>
<anyName/>
</attribute>
<element name="newline">
<a:documentation>
Force subsequent groups to start on a new line.
</a:documentation>
<empty/>
</element>
<element name="separator">
<optional>
<attribute name="string">
<a:documentation>
The title of the separator.
</a:documentation>
</attribute>
</optional>
<a:documentation>
Insert vertical spacing within groups.
</a:documentation>
<empty/>
</element>
</choice>
</zeroOrMore>
</element>
</define>
<define name="notebook">
<element name="notebook">
<a:documentation>
A notebook-like tabbed container for `<page>`s.
</a:documentation>
<zeroOrMore>
<ref name="form_children"/>
</zeroOrMore>
</element>
</define>
<define name="form_field">
<element name="field">
<a:documentation>
A field displayed in the form view.
</a:documentation>
<attribute name="name">
<a:documentation>
The name of the field that will be displayed.
</a:documentation>
</attribute>
<zeroOrMore>
<choice>
<ref name="view_field_attrs"/>
<ref name="tree"/>
<ref name="form"/>
<attribute name="colspan" a:defaultValue="1">
<data type="nonNegativeInteger"/>
<a:documentation>
The number of columns this field should span.
</a:documentation>
</attribute>
<attribute name="placeholder">
<a:documentation>
The placeholder text for the field. Useful for hints to text fields.
</a:documentation>
</attribute>
<attribute name="help">
<a:documentation>
A tooltip to display upon hovering.
</a:documentation>
</attribute>
<attribute name="mode">
<choice>
<text/>
<value>tree</value>
<value>form</value>
<value>kanban</value>
<value>graph</value>
</choice>
<a:documentation>
A comma-separated list of subview modes for a relational field.
</a:documentation>
</attribute>
<attribute name="filename">
<a:documentation>
The name of a `Char` field that specifies a `Binary` field's file name.
</a:documentation>
</attribute>
<attribute name="password" a:defaultValue="False">
<a:documentation>
Whether to mask this field's data.
</a:documentation>
</attribute>
<attribute name="kanban_view_ref">
<a:documentation>
The external ID of a kanban view to display for this field.
</a:documentation>
</attribute>
<attribute name="default_focus" a:defaultValue="False">
<a:documentation>
Whether this field should be focused when the form is opened.
Only one field can have this attribute set to `True` per view (excluding subviews).
</a:documentation>
</attribute>
</choice>
</zeroOrMore>
</element>
</define>
<define name="form_button">
<element name="button">
<a:documentation>
A button that will be displayed in the form view.
</a:documentation>
<choice>
<ref name="view_button_attrs_required"/>
<group>
<optional>
<ref name="view_button_attrs_required"/>
</optional>
<attribute name="special">
<choice>
<value>save</value>
<value>cancel</value>
</choice>
<a:documentation>
What clicking this button should do. `type` and `name` are ignored if this is specified.
</a:documentation>
</attribute>
</group>
</choice>
<zeroOrMore>
<choice>
<ref name="view_button_attrs"/>
<attribute name="confirm">
<a:documentation>
A confirmation message to display before executing the action.
</a:documentation>
</attribute>
<attribute name="data-hotkey">
<a:documentation>
Assign a hotkey to this button. Can be a single character, or `shift+$KEY`.
</a:documentation>
</attribute>
</choice>
</zeroOrMore>
</element>
</define>
<define name="invisible">
<attribute name="invisible" a:defaultValue="False">
<a:documentation>
Whether the element is invisible. Takes a Python expression.
</a:documentation>
</attribute>
</define>
<define name="groups">
<attribute name="groups">
<a:documentation>
A comma-separated list of `res.groups` that are allowed to see this element.
Prefix a group with `!` to negate it.
</a:documentation>
</attribute>
</define>
<define name="view_field_attrs">
<!-- Common attributes on all view fields. -->
<choice>
<ref name="decoration"/>
<ref name="oe_class"/>
<ref name="invisible"/>
<ref name="groups"/>
<attribute name="string">
<a:documentation>
The title of the field that will be displayed.
</a:documentation>
</attribute>
<attribute name="id">
<a:documentation>
Specify this when including the same field multiple times in a view.
</a:documentation>
</attribute>
<attribute name="optional">
<choice>
<value>show</value>
<value>hide</value>
</choice>
<a:documentation>
Allows the field to be shown/hidden by the user, and whether to show it by default.
</a:documentation>
</attribute>
<attribute name="readonly" a:defaultValue="False">
<a:documentation>
Whether the field is read-only. Takes a Python expression.
</a:documentation>
</attribute>
<attribute name="required" a:defaultValue="False">
<a:documentation>
Whether the field is required. Takes a Python expression.
</a:documentation>
</attribute>
<attribute name="widget">
<a:documentation xml:space="preserve">
The widget used to display the field.<br/>
See https://www.odoo.com/documentation/latest/developer/reference/frontend/javascript_reference.html#fields
for a non-exhaustive listing of Javascript fields.
</a:documentation>
</attribute>
<attribute name="options" a:defaultValue="{}">
<a:documentation xml:space="preserve">
A Python dictionary containing additional options for the widget.<br/><br/>
On relational fields, these options are used to control creation/editing behavior:
`no_create`, `no_quick_create`, `no_open`, `no_open_edit` and so on.<br/> <br/>
See https://www.odoo.com/documentation/latest/developer/reference/frontend/javascript_reference.html#fields
for a non-exhaustive listing of Javascript fields, and options that they accept.
</a:documentation>
</attribute>
<attribute name="width">
<a:documentation>
THe CSS width of the column, when there are no records in the list.
</a:documentation>
</attribute>
<attribute name="nolabel">
<value>1</value>
<a:documentation>
Whether to hide the label of the field.
</a:documentation>
</attribute>
<attribute name="domain" a:defaultValue="[]">
<a:documentation>
A
[domain](https://www.odoo.com/documentation/latest/developer/reference/backend/orm.html#reference-orm-domains)
to filter records assignable to this field.
</a:documentation>
</attribute>
<attribute name="context" a:defaultValue="{}">
<a:documentation>
Additional context to pass when creating new records for this field, or when searching and editing. Takes a
Python dictionary.
</a:documentation>
</attribute>
</choice>
</define>
<define name="tree_button_attrs">
<ref name="view_button_attrs_required"/>
<zeroOrMore>
<choice>
<ref name="view_button_attrs"/>
<attribute name="column_invisible" a:defaultValue="False">
<a:documentation>
Whether this button's column should be hidden. Takes a Python expression.
</a:documentation>
</attribute>
</choice>
</zeroOrMore>
</define>
<define name="view_button_attrs_required">
<attribute name="type">
<choice>
<value>object</value>
<value>action</value>
</choice>
<a:documentation xml:space="preserve">
What should happen when the button is clicked.<br/>
- `object`: Call a method on the view's model.<br/>
- `action`: Execute an action.
</a:documentation>
</attribute>
<attribute name="name">
<a:documentation xml:space="preserve">
What to invoke when the button is clicked.<br/>
- When `type` is `object`, this is the method to call.<br/>
- When `type` is `action`, this is the external ID of the action to execute.
Either an integer ID or a string format `%(xmlid)d`.
</a:documentation>
</attribute>
</define>
<define name="view_button_attrs">
<choice>
<ref name="oe_class"/>
<ref name="invisible"/>
<ref name="groups"/>
<attribute name="string">
<a:documentation>
The button's text, or alt-text if `icon` is specified.
</a:documentation>
</attribute>
<attribute name="icon">
<a:documentation xml:space="preserve">
The icon to display on the button.<br/><br/>
See https://www.odoo.com/documentation/latest/developer/reference/user_interface/icons.html#reference-user-interface-ui-icons
</a:documentation>
</attribute>
<attribute name="help">
<a:documentation>
A tooltip to display upon hovering.
</a:documentation>
</attribute>
<attribute name="context" a:defaultValue="{}">
<a:documentation>
Additional context to pass to the method or action.
Accepts a Python dictionary.
</a:documentation>
</attribute>
</choice>
</define>
<define name="tree_field">
<element name="field">
<a:documentation>
A field that will be displayed in the list view.
</a:documentation>
<attribute name="name">
<a:documentation>
The name of the field that will be displayed.
</a:documentation>
</attribute>
<zeroOrMore>
<choice>
<ref name="view_field_attrs"/>
<attribute name="column_invisible" a:defaultValue="False">
<a:documentation>
Whether the entire column shoud be hidden. Takes a Python expression.
</a:documentation>
</attribute>
<attribute name="sum">
<a:documentation>
Display a sum of this column, with the specified title.
</a:documentation>
</attribute>
<attribute name="avg">
<a:documentation>
Display an average of this column, with the specified title.
</a:documentation>
</attribute>
</choice>
</zeroOrMore>
</element>
</define>
<define name="any">
<choice>
<ref name="tree"/>
<ref name="tree_field"/>
<element>
<anyName>
<except>
<name>tree</name>
<name>field</name>
</except>
</anyName>
<zeroOrMore>
<choice>
<attribute>
<anyName/>
</attribute>
<text/>
<ref name="any"/>
</choice>
</zeroOrMore>
</element>
</choice>
</define>
<define name="arch_fragment">
<choice>
<ref name="tree"/>
<ref name="form"/>
<element name="xpath">
<a:documentation>
Matches a node in the inherited view using XPath.
</a:documentation>
<attribute name="expr">
<a:documentation>
The [XPath expression](https://developer.mozilla.org/en-US/docs/Web/XPath) to locate elements in
the inherited view. Note that only the first match is used.
</a:documentation>
</attribute>
<ref name="position"/>
</element>
<element>
<anyName>
<except>
<name>tree</name>
<name>form</name>
<name>xpath</name>
</except>
</anyName>
<zeroOrMore>
<choice>
<attribute>
<anyName>
<except>
<name>position</name>
</except>
</anyName>
</attribute>
</choice>
</zeroOrMore>
<ref name="position"/>
</element>
</choice>
</define>
<define name="position">
<choice>
<group>
<optional> <!-- TODO: remove this optional once all structures are done -->
<attribute name="position">
<a:documentation>
Specify how to modify/insert elements with respect to this XPath node.
</a:documentation>
<choice>
<value>before</value>
<value>after</value>
<value>replace</value>
<value>inside</value>
</choice>
</attribute>
</optional>
<zeroOrMore>
<ref name="form_children"/>
</zeroOrMore>
</group>
<group>
<attribute name="position">
<value>attributes</value>
</attribute>
<oneOrMore>
<element name="attribute">
<a:documentation>
Attributes to set on the parent node. Leave empty to remove the attribute.
</a:documentation>
<attribute name="name">
<a:documentation>
The name of the attribute to set.
</a:documentation>
</attribute>
<zeroOrMore>
<choice>
<text/>
<attribute name="add">
<a:documentation>
What to add to the attribute. The value is automatically preceded by `separator`.
</a:documentation>
</attribute>
<attribute name="remove">
<a:documentation>
Which part to remove from the attribute, after splitting by `separator`.
</a:documentation>
</attribute>
<attribute name="separator" a:defaultValue=",">
<a:documentation>
The separator to split the attribute by. `remove` will remove contiguous substrings of the
attribute, as determined by this separator.
</a:documentation>
</attribute>
</choice>
</zeroOrMore>
</element>
</oneOrMore>
</group>
</choice>
</define>
<define name="value">
<element name="value">
<a:documentation>
A value that will be used to set the value of a field in a record.
</a:documentation>
<optional>
<attribute name="name">
<a:documentation>
The name of the field that this value will be set to.
</a:documentation>
</attribute>
</optional>
<optional>
<attribute name="model">
<a:documentation>
The name of the model that this value will act on, e.g. `res.partner`.
</a:documentation>
</attribute>
</optional>
<choice>
<attribute name="search">
<a:documentation>
A domain that will be used to search for the value.
</a:documentation>
</attribute>
<attribute name="eval">
<a:documentation>
A Python expression that will be evaluated to produce the value.
</a:documentation>
</attribute>
<group>
<optional>
<attribute name="type"/>
</optional>
<choice>
<attribute name="file"/>
<text/>
</choice>
</group>
</choice>
<optional>
<attribute name="use">
<a:documentation>
If specified, extract this field from the result of the search.
</a:documentation>
</attribute>
</optional>
</element>
</define>
<define name="function">
<element name="function">
<a:documentation>
A function that will be called when this XML file is imported into Odoo.
</a:documentation>
<attribute name="model">
<a:documentation>
The name of the model that this function will act on.
</a:documentation>
</attribute>
<attribute name="name">
<a:documentation>
The name of the function that will be called.
</a:documentation>
</attribute>
<ref name="env"/>
<optional>
<choice>
<attribute name="eval">
<a:documentation>
A Python expression that will be evaluated to produce the value.
</a:documentation>
</attribute>
<oneOrMore>
<choice>
<ref name="value"/>
<ref name="function"/>
</choice>
</oneOrMore>
</choice>
</optional>
</element>
</define>