|
5 | 5 | <field name="priority">1</field> |
6 | 6 | <field name="arch" type="xml"> |
7 | 7 | <list> |
8 | | - <field name="name" column_invisible="1"/> |
9 | | - <field name="draft_name" string="Name"/> |
| 8 | + <field name="name" column_invisible="1" /> |
| 9 | + <field name="draft_name" string="Name" /> |
10 | 10 | <field name="altnames" /> |
11 | 11 | <field name="code" /> |
12 | 12 | <field name="parent_id" /> |
13 | 13 | <field name="complete_name" string="Complete Name" /> |
14 | 14 | <field name="area_level" /> |
15 | 15 | <field name="area_type_id" string="Area Type" /> |
16 | | - <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" optional="hide" /> |
| 16 | + <field |
| 17 | + name="tag_ids" |
| 18 | + widget="many2many_tags" |
| 19 | + options="{'color_field': 'color'}" |
| 20 | + optional="hide" |
| 21 | + /> |
17 | 22 | </list> |
18 | 23 | </field> |
19 | 24 | </record> |
|
27 | 32 | <sheet> |
28 | 33 | <!-- Title Section --> |
29 | 34 | <div class="oe_title"> |
30 | | - <label for="parent_id" class="oe_edit_only"/> |
| 35 | + <label for="parent_id" class="oe_edit_only" /> |
31 | 36 | <h3 class="text-muted mb-2"> |
32 | 37 | <field |
33 | 38 | name="parent_id" |
34 | 39 | placeholder="Select Parent Area..." |
35 | | - options="{'no_open':True,'no_create_edit':True,'no_create':True}"/> |
| 40 | + options="{'no_open':True,'no_create_edit':True,'no_create':True}" |
| 41 | + /> |
36 | 42 | </h3> |
37 | | - <label for="name" class="oe_edit_only"/> |
| 43 | + <label for="name" class="oe_edit_only" /> |
38 | 44 | <h1> |
39 | 45 | <field |
40 | 46 | name="name" |
41 | 47 | placeholder="Area Name..." |
42 | 48 | readonly="1" |
43 | 49 | force_save="1" |
44 | | - class="oe_read_only"/> |
| 50 | + class="oe_read_only" |
| 51 | + /> |
45 | 52 | <field |
46 | 53 | name="draft_name" |
47 | 54 | placeholder="Enter Area Name..." |
48 | | - class="oe_edit_only"/> |
| 55 | + class="oe_edit_only" |
| 56 | + /> |
49 | 57 | </h1> |
50 | 58 | </div> |
51 | 59 |
|
52 | 60 | <!-- Hidden Fields --> |
53 | | - <field name="level" invisible="1"/> |
| 61 | + <field name="level" invisible="1" /> |
54 | 62 |
|
55 | 63 | <!-- Main Information --> |
56 | 64 | <group> |
57 | 65 | <group string="Basic Information"> |
58 | | - <field name="code" placeholder="Area Code..."/> |
59 | | - <field name="altnames" |
60 | | - string="Alternate Names" |
61 | | - placeholder="Alternative names for this area..."/> |
62 | | - <field name="complete_name" readonly="1"/> |
| 66 | + <field name="code" placeholder="Area Code..." /> |
| 67 | + <field |
| 68 | + name="altnames" |
| 69 | + string="Alternate Names" |
| 70 | + placeholder="Alternative names for this area..." |
| 71 | + /> |
| 72 | + <field name="complete_name" readonly="1" /> |
63 | 73 | </group> |
64 | 74 | <group string="Classification"> |
65 | | - <field name="area_level"/> |
66 | | - <field name="area_type_id" |
67 | | - options="{'no_open': True, 'no_create': True}"/> |
68 | | - <field name="area_sqkm" |
69 | | - string="Area (sq/km)" |
70 | | - widget="float"/> |
| 75 | + <field |
| 76 | + name="area_level" |
| 77 | + string="Admin Level" |
| 78 | + help="Hierarchical level of this area, automatically computed from its position in the area tree (0 = top-level)." |
| 79 | + /> |
| 80 | + <field |
| 81 | + name="area_type_id" |
| 82 | + string="Area Type" |
| 83 | + help="Classification type for this area (e.g., Province, Municipality, Barangay)." |
| 84 | + options="{'no_open': True, 'no_create': True}" |
| 85 | + /> |
| 86 | + <field |
| 87 | + name="area_sqkm" |
| 88 | + string="Area (sq km)" |
| 89 | + help="Geographic size of this area in square kilometers." |
| 90 | + widget="float" |
| 91 | + /> |
71 | 92 | </group> |
72 | 93 | </group> |
73 | 94 |
|
74 | 95 | <!-- Tags Section --> |
75 | 96 | <group string="Tags"> |
76 | | - <field name="tag_ids" |
77 | | - widget="many2many_tags" |
78 | | - placeholder="Add tags..." |
79 | | - options="{'color_field': 'color', 'no_create_edit': True}"/> |
| 97 | + <field |
| 98 | + name="tag_ids" |
| 99 | + widget="many2many_tags" |
| 100 | + placeholder="Add tags..." |
| 101 | + options="{'color_field': 'color', 'no_create_edit': True}" |
| 102 | + /> |
80 | 103 | </group> |
81 | 104 |
|
82 | 105 | <!-- Child Areas --> |
83 | 106 | <notebook> |
84 | 107 | <page name="child" string="Child Areas"> |
85 | 108 | <field name="child_ids" nolabel="1"> |
86 | 109 | <list> |
87 | | - <field name="name"/> |
88 | | - <field name="code" optional="show"/> |
89 | | - <field name="area_type_id" string="Type" optional="show"/> |
90 | | - <field name="area_level" optional="hide"/> |
| 110 | + <field name="name" /> |
| 111 | + <field name="code" optional="show" /> |
| 112 | + <field |
| 113 | + name="area_type_id" |
| 114 | + string="Type" |
| 115 | + optional="show" |
| 116 | + /> |
| 117 | + <field name="area_level" optional="hide" /> |
91 | 118 | </list> |
92 | 119 | </field> |
93 | 120 | </page> |
|
106 | 133 | <field name="name" /> |
107 | 134 | <field name="parent_id" /> |
108 | 135 | <field name="tag_ids" /> |
109 | | - <filter name="grp_parent" string="Parent" context="{'group_by': 'parent_id'}" /> |
110 | | - <filter name="grp_level" string="Level" context="{'group_by': 'area_level'}" /> |
| 136 | + <filter |
| 137 | + name="grp_parent" |
| 138 | + string="Parent" |
| 139 | + context="{'group_by': 'parent_id'}" |
| 140 | + /> |
| 141 | + <filter |
| 142 | + name="grp_level" |
| 143 | + string="Level" |
| 144 | + context="{'group_by': 'area_level'}" |
| 145 | + /> |
111 | 146 | </search> |
112 | 147 | </field> |
113 | 148 | </record> |
|
123 | 158 | <field name="help" type="html"> |
124 | 159 | <p class="o_view_nocontent_smiling_face"> |
125 | 160 | Create a new Area! |
126 | | - </p><p> |
| 161 | + </p> |
| 162 | + <p> |
127 | 163 | Click the create button to enter the information of the Area. |
128 | 164 | </p> |
129 | 165 | </field> |
|
151 | 187 | sequence="0" |
152 | 188 | /> |
153 | 189 |
|
154 | | - <menuitem id="area_main_top_menu" name="Areas" parent="area_main_menu_root" sequence="10" /> |
| 190 | + <menuitem |
| 191 | + id="area_main_top_menu" |
| 192 | + name="Areas" |
| 193 | + parent="area_main_menu_root" |
| 194 | + sequence="10" |
| 195 | + /> |
155 | 196 |
|
156 | 197 | <menuitem |
157 | 198 | id="menu_spparea" |
|
0 commit comments