[FIX] user preferences: make menu-tips checkbox writeable for normal users
[odoo/odoo.git] / bin / addons / base / base_update.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4         <!--
5     ======================
6     Languages
7     ======================
8     -->
9         <menuitem id="next_id_2" name="User Interface" parent="base.menu_custom" groups="base.group_extended"/>
10
11         <!--
12     ======================
13     Groups
14     ======================
15     -->
16         <record id="view_groups_form" model="ir.ui.view">
17             <field name="name">res.groups.form</field>
18             <field name="model">res.groups</field>
19             <field name="type">form</field>
20             <field name="arch" type="xml">
21                 <form string="Groups">
22                     <field name="name" select="1"/>
23                     <notebook colspan="4">
24                         <page string="Users">
25                             <field colspan="4" name="users" nolabel="1"/>
26                         </page>
27                         <page string="Menus">
28                             <field colspan="4" name="menu_access" nolabel="1"/>
29                         </page>
30                         <page string="Access Rights">
31                             <field colspan="4" name="model_access" nolabel="1">
32                                 <tree string="Access Rules" editable="top">
33                                     <field name="model_id"/>
34                                     <field name="perm_read"/>
35                                     <field name="perm_write"/>
36                                     <field name="perm_create"/>
37                                     <field name="perm_unlink"/>
38                                     <field name="name"/>
39                                 </tree>
40                                 <form string="Access Controls">
41                                     <field colspan="4" name="name" select="1"/>
42                                     <field name="model_id" select="1"/>
43                                     <newline/>
44                                     <field name="perm_read"/>
45                                     <field name="perm_write"/>
46                                     <field name="perm_create"/>
47                                     <field name="perm_unlink"/>
48                                 </form>
49                             </field>
50                         </page>
51                         <page string="Rules">
52                             <field colspan="4" name="rule_groups" nolabel="1">
53                                 <tree string="Rules">
54                                     <field name="name"/>
55                                     <field name="model_id"/>
56                                     <field name="global"/>
57                                 </tree>
58                             </field>
59                         </page><page string="Notes">
60                             <field colspan="4" name="comment" nolabel="1"/>
61                         </page>
62                     </notebook>
63                 </form>
64             </field>
65         </record>
66
67         <!--
68     ======================
69     Users
70     ======================
71     -->
72         <record id="view_users_form_simple_modif" model="ir.ui.view">
73             <field name="name">res.users.form.modif</field>
74             <field name="model">res.users</field>
75             <field name="type">form</field>
76             <field eval="18" name="priority"/>
77             <field name="arch" type="xml">
78                 <form string="Users">
79                     <notebook colspan="4">
80                         <page string="Current Activity">
81                             <field name="company_id" widget="selection" readonly="0"
82                                     context="{'user_id': self, 'user_preference': 1}"/>
83                             <field name="view" readonly="0"/>
84                             <label string="" colspan="2"/>
85                             <field name="menu_tips" colspan="2" readonly="0"/>
86                             <newline/>
87                             <separator colspan="4" string="Preferences"/>
88                         </page>
89                          <page string="Preferences">
90                             <field name="password" password="True" readonly="0" colspan="4"/>
91                             <label string="" colspan="1"/>
92                             <label colspan="3" string="You must logout and login again after changing your password."/>
93                             <field name="context_lang" completion="1" readonly="0"/>
94                             <field name="context_tz" completion="1" readonly="0"/>
95                             <separator string="Email &amp; Signature" colspan="4"/>
96                             <group colspan="4"><field name="user_email" widget="email"/></group>
97                             <field colspan="4" name="signature" readonly="0" nolabel="1"/>
98                           </page>
99                     </notebook>
100                 </form>
101             </field>
102         </record>
103
104         <record id="view_users_form" model="ir.ui.view">
105             <field name="name">res.users.form</field>
106             <field name="model">res.users</field>
107             <field name="type">form</field>
108             <field name="arch" type="xml">
109                 <form string="Users">
110                     <field name="name" select="1"/>
111                     <field name="active"/>
112                     <field name="login" select="1"/>
113                     <field name="password" password="True"/>
114                     <newline/>
115                     <notebook colspan="4">
116                         <page string="User">
117                             <field name="address_id" select="1"/>
118                             <field name="user_email" widget="email"/>
119                             <field name="company_id" required="1" context="{'user_id': self, 'user_preference': 1}"/>
120                             <field name="action_id" required="True"/>
121                             <field domain="[('usage','=','menu')]" name="menu_id" required="True"/>
122                             <field name="context_lang"/>
123                             <field name="context_tz"/>
124                             <field name="view" readonly="0"/>
125                             <field name="menu_tips" colspan="2"/>
126                             <label string="" colspan="2"/>
127                             <group colspan="2" col="2">
128                                 <separator string="Signature" colspan="2"/>
129                                 <field colspan="2" name="signature" nolabel="1"/>
130                             </group>
131                             <group colspan="2" col="2" expand="1">
132                                 <separator string="Access Rights (groups)" colspan="2"/>
133                                 <field colspan="2" nolabel="1" name="groups_id"/>
134                             </group>
135                         </page>
136                         <page string="Roles">
137                             <field colspan="4" nolabel="1" name="roles_id"/>
138                         </page>
139                         <page string="Companies">
140                             <field colspan="4" nolabel="1" name="company_ids" select="1"/>
141                         </page>
142                     </notebook>
143                 </form>
144             </field>
145         </record>
146         <record id="view_users_tree" model="ir.ui.view">
147             <field name="name">res.users.tree</field>
148             <field name="model">res.users</field>
149             <field name="type">tree</field>
150             <field name="arch" type="xml">
151                 <tree string="Users">
152                     <field name="name"/>
153                     <field name="login"/>
154                     <field name="address_id" string="Address" />
155                     <field name="company_id"/>
156                 </tree>
157             </field>
158         </record>
159
160         <record id="view_users_search" model="ir.ui.view">
161             <field name="name">res.users.search</field>
162             <field name="model">res.users</field>
163             <field name="type">search</field>
164             <field name="arch" type="xml">
165                 <search string="Users">
166                     <field name="name" select="1"/>
167                     <field name="login" select="1"/>
168                     <field name="address_id" select="1" string="Address"/>
169                     <field name="company_ids" select="1" string="Company"/>
170                 </search>
171             </field>
172         </record>
173         <!--
174     ======================
175     Company
176     ======================
177     -->
178         <record id="view_company_form" model="ir.ui.view">
179             <field name="name">res.company.form</field>
180             <field name="model">res.company</field>
181             <field name="type">form</field>
182             <field name="arch" type="xml">
183                 <form string="Company">
184                     <group colspan="4" col="6">
185                         <field colspan="4" name="name" select="1"/>
186                         <field name="partner_id" readonly="1" select="1" required="0"/>
187                         <field name="parent_id" select="1" groups="base.group_multi_company"/>
188                     </group>
189                     <notebook colspan="4">
190                         <page string="General Information">
191                             <field name="rml_header1" colspan="4"/>
192                             <field name="rml_footer1" colspan="4"/>
193                             <field name="rml_footer2" colspan="4"/>
194                             <field name="currency_id"/>
195                             <separator colspan="4" string="Your Logo - Use a size of about 450x150 pixels."/>
196                             <field colspan="4" name="logo" widget="image"/>
197                         </page>
198                         <page string="Header/Footer" groups="base.group_extended">
199                             <field colspan="4" name="rml_header" nolabel="1"/>
200                         </page>
201                         <page string="Internal Header/Footer" groups="base.group_extended">
202                             <separator string="Portrait" colspan="2"/>
203                             <separator string="Landscape" colspan="2"/>
204                             <field colspan="2" name="rml_header2" nolabel="1"/>
205                             <field colspan="2" name="rml_header3" nolabel="1"/>
206                         </page>
207                         <page string="Configuration">
208                         </page>
209                     </notebook>
210                 </form>
211             </field>
212         </record>
213         <record id="view_company_tree" model="ir.ui.view">
214             <field name="name">res.company.tree</field>
215             <field name="model">res.company</field>
216             <field name="type">tree</field>
217             <field name="field_parent">child_ids</field>
218             <field name="arch" type="xml">
219                 <tree string="Companies">
220                     <field name="name"/>
221                     <field name="partner_id"/>
222                 </tree>
223             </field>
224         </record>
225
226         <record id="view_users_configuration_form" model="ir.ui.view">
227             <field name="name">res.config.users.confirm.form</field>
228             <field name="model">res.config.users</field>
229             <field name="type">form</field>
230             <field name="inherit_id" ref="res_config_view_base"/>
231             <field name="arch" type="xml">
232               <data>
233                 <form position="attributes">
234                   <attribute name="string">Create User</attribute>
235                 </form>
236
237                 <group string="res_config_contents" position="replace">
238                   <separator string="New User" colspan="4"/>
239                   <field name="name"/>
240                   <field name="email"/>
241                   <field name="login"/>
242                   <field name="password" password="True"/>
243                   <field name="context_lang"/>
244                   <field name="context_tz"/>
245
246                   <separator string="Group" colspan="4"/>
247                   <label  align="0.0" colspan="4" string="Groups are used to define access rights on objects and the visibility of screens and menus"/>
248                   <field colspan="4" nolabel="1" name="groups_id"/>
249                 </group>
250
251                 <xpath expr='//button[@name="action_next"]'
252                        position='attributes'>
253                   <attribute name="name">action_add</attribute>
254                   <attribute name='string'>Add User</attribute>
255                   <attribute name='icon'>gtk-add</attribute>
256                 </xpath>
257
258                 <xpath expr='//button[@name="action_skip"]'
259                        position='attributes'>
260                   <!-- if this one is performed first, it transforms
261                        the action_skip into action_next, and the
262                        transformation of action_next to action_add,
263                        since it uses first-match, transforms the same
264                        button. And we end up with [add] [next] instead
265                        of [next] [add]
266
267                        Would probably be simpler to just replace both
268                        by nothing and create a pair of brand new
269                        buttons... but we'd have to handle the groups
270                        around the buttons... oh well...
271                   -->
272                   <attribute name="name">action_next</attribute>
273                   <attribute name='string'>Done</attribute>
274                   <attribute name='icon'>gtk-go-forward</attribute>
275                 </xpath>
276               </data>
277             </field>
278         </record>
279
280         <record id="action_config_user_form" model="ir.actions.act_window">
281             <field name="name">Create Users</field>
282             <field name="type">ir.actions.act_window</field>
283             <field name="res_model">res.config.users</field>
284             <field name="view_type">form</field>
285             <field name="view_mode">form</field>
286             <field name="view_id" ref="view_users_configuration_form"/>
287             <field name="target">new</field>
288         </record>
289
290         <record id="view_confirm_simple_view_form" model="ir.ui.view">
291             <field name="name">res.users.confirm.simple_view</field>
292             <field name="model">res.config.view</field>
293             <field name="type">form</field>
294             <field name="inherit_id" ref="res_config_view_base"/>
295             <field name="arch" type="xml">
296               <data>
297                 <form position="attributes">
298                   <attribute name="string">Choose Your Interface</attribute>
299                 </form>
300                 <xpath expr="//label[@string='description']"
301                      position="attributes">
302                 <attribute name="string">Choose between the simplified interface and the extended one. We suggest simplified interface. It has less options and fields but is easier to start with OpenERP. You will be able to switch to the extended interface later.</attribute>
303               </xpath>
304               <xpath expr='//separator[@string="title"]' position='attributes'>
305                     <attribute name='string'>Choose Your Interface</attribute>
306               </xpath>
307               <xpath expr='//separator[@string="vsep"]' position='attributes'>
308                     <attribute name='string'></attribute>
309                     <attribute name='rowspan'>12</attribute>
310               </xpath>
311                <group string="res_config_contents" position="replace">
312                       <group colspan="4">
313                           <field colspan="4" name="view" nolabel="1"/>
314                     </group>
315                 </group>
316                 <xpath expr='//button[@name="action_skip"]' position='replace'/>
317                 <xpath expr='//button[@name="action_next"]' position='attributes'>
318                   <attribute name='string'>Set</attribute>
319                 </xpath>
320               </data>
321             </field>
322         </record>
323
324         <record id="action_config_simple_view_form" model="ir.actions.act_window">
325             <field name="name">Select Your Interface</field>
326             <field name="type">ir.actions.act_window</field>
327             <field name="res_model">res.config.view</field>
328             <field name="view_type">form</field>
329             <field name="view_id" ref="view_confirm_simple_view_form"/>
330             <field name="view_mode">form</field>
331             <field name="target">new</field>
332         </record>
333
334         <record id="config_wizard_step_user" model="ir.actions.todo">
335             <field name="action_id" ref="action_config_user_form"/>
336             <field name="sequence">10</field>
337             <field name="restart">never</field>
338             <field name="state">done</field>
339         </record>
340         <record id="config_wizard_simple_view" model="ir.actions.todo">
341             <field name="action_id" ref="action_config_simple_view_form"/>
342             <field name="sequence">1</field>
343         </record>
344     </data>
345 </openerp>