[IMP]Base:ADD Report Button and Upload Logo wiz
[odoo/odoo.git] / openerp / 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
73         <record id="view_users_form_simple_modif" model="ir.ui.view">
74             <field name="name">res.users.form.modif</field>
75             <field name="model">res.users</field>
76             <field name="type">form</field>
77             <field eval="18" name="priority"/>
78             <field name="arch" type="xml">
79                 <form string="Users">
80                     <notebook colspan="4">
81                         <page string="Current Activity">
82                             <field name="company_id" widget="selection" readonly="0"
83                                     groups="base.group_multi_company"
84                                     on_change="on_change_company_id(company_id)" />
85                             <field name="view" readonly="0"/>
86                             <label string="" colspan="2"/>
87                             <separator string="Default Filters" colspan="4"/>
88                             <newline/>
89                         </page>
90                          <page string="Preferences">
91                             <field name="context_lang" completion="1" readonly="0"/>
92                             <field name="context_tz" completion="1" readonly="0"/>
93                             <field name="menu_tips" colspan="2" readonly="0"/>
94                             <separator string="Email &amp; Signature" colspan="4"/>
95                             <group colspan="4"><field name="user_email" widget="email" readonly="0"/></group>
96                             <field colspan="4" name="signature" readonly="0" nolabel="1"/>
97                           </page>
98                     </notebook>
99                 </form>
100             </field>
101         </record>
102
103         <record id="view_users_form" model="ir.ui.view">
104             <field name="name">res.users.form</field>
105             <field name="model">res.users</field>
106             <field name="type">form</field>
107             <field name="arch" type="xml">
108                 <form string="Users">
109                     <field name="name" select="1"/>
110                     <field name="active"/>
111                     <field name="login" select="1"/>
112                     <field name="new_password" password="True"/>
113                     <newline/>
114                     <notebook colspan="4">
115                         <page string="User">
116                             <group colspan="1" col="2">
117                                 <separator string="Contact" colspan="2"/>
118                                 <field name="company_id" required="1"
119                                     context="{'user_preference': 0}"
120                                     groups="base.group_multi_company"
121                                     />
122                                 <field name="address_id"/>
123                                 <field name="user_email" widget="email"/>
124                             </group>
125                             <group colspan="1" col="2" groups="base.group_extended">
126                                 <separator string="Action" colspan="2"/>
127                                 <field name="action_id"/>
128                                 <field domain="[('usage','=','menu')]" name="menu_id" required="True"/>
129                             </group>
130                             <group colspan="1" col="2">
131                                 <separator string="Preferences" colspan="2"/>
132                                 <field name="context_lang"/>
133                                 <field name="context_tz"/>
134                                 <group colspan="2" col="4">
135                                      <field name="view" readonly="0"/>
136                                      <field name="menu_tips" colspan="2"/>
137                                 </group>
138                             </group>
139                             <newline/>
140                             <group colspan="2" col="2">
141                                 <separator string="Signature" colspan="2"/>
142                                 <field colspan="2" name="signature" nolabel="1"/>
143                             </group>
144                             <group colspan="2" col="2" expand="1">
145                                 <separator string="Groups" colspan="2"/>
146                                 <field colspan="2" nolabel="1" name="groups_id"/>
147                             </group>
148                         </page>
149                         <page string="Companies" groups="base.group_multi_company">
150                             <field colspan="4" nolabel="1" name="company_ids" select="1"/>
151                         </page>
152                     </notebook>
153                 </form>
154             </field>
155         </record>
156         <record id="view_users_tree" model="ir.ui.view">
157             <field name="name">res.users.tree</field>
158             <field name="model">res.users</field>
159             <field name="type">tree</field>
160             <field name="arch" type="xml">
161                 <tree string="Users">
162                     <field name="name"/>
163                     <field name="login"/>
164                     <field name="context_lang"/>
165                     <field name="date"/>
166                 </tree>
167             </field>
168         </record>
169
170         <record id="view_users_search" model="ir.ui.view">
171             <field name="name">res.users.search</field>
172             <field name="model">res.users</field>
173             <field name="type">search</field>
174             <field name="arch" type="xml">
175                 <search string="Users">
176                     <field name="name"/>
177                     <field name="login"/>
178                     <field name="address_id" string="Address"/>
179                     <field name="company_ids" string="Company" groups="base.group_multi_company"/>
180                 </search>
181             </field>
182         </record>
183         
184              <!--
185     ======================
186     Logo wiz
187     ======================
188     -->
189         
190         <record id="view_res_company_logo" model="ir.ui.view">
191             <field name="name">res.company.logo.form</field>
192             <field name="model">res.company.logo</field>
193             <field name="type">form</field>
194             <field name="arch" type="xml">
195                 <form string="Upload Logo">
196                     <separator string="Upload your company logo in JPG or PNG with a format similar to 450*150 pixels" colspan="4"/>
197                     <field colspan="4" height="150" name="logo" widget="image"/>
198                     <separator colspan="4"/>
199                     <group colspan="4" col="6">
200                        <label string="" colspan="2"/>
201                        <button icon="gtk-cancel" special="cancel" string="Cancel"/>
202                        <button icon="gtk-ok" string="Upload" name="execute" type="object"/>
203                     </group>
204                 </form>
205             </field>
206         </record>
207
208         <record id="action_res_company_logo" model="ir.actions.act_window">
209             <field name="name">Set Logo</field>
210             <field name="res_model">res.company.logo</field>
211             <field name="view_type">form</field>
212             <field name="view_mode">tree,form</field>
213             <field name="view_id" ref="view_res_company_logo"/>
214             <field name="target">new</field>
215         </record>
216         
217         <!--
218     ======================
219     Company
220     ======================
221     -->
222         <record id="view_company_form" model="ir.ui.view">
223             <field name="name">res.company.form</field>
224             <field name="model">res.company</field>
225             <field name="type">form</field>
226             <field name="arch" type="xml">
227                 <form string="Company">
228                     <group colspan="4" col="6">
229                         <field colspan="4" name="name" select="1"/>
230                         <field name="partner_id" readonly="1" select="1" required="0"/>
231                         <field name="parent_id" select="1" groups="base.group_multi_company"/>
232                     </group>
233                     <notebook colspan="4">
234                         <page string="General Information">
235                             <field name="rml_header1" colspan="4"/>
236                             <field name="rml_footer1" colspan="4"/>
237                             <field name="rml_footer2" colspan="4"/>
238                             <field name="currency_id"/>
239                             <button name="createReport" string="Print" type="object" icon="gtk-print"/>
240                             <button name="%(action_res_company_logo)d"
241                     string="Upload your logo" type="action" icon="gtk-ok"/>
242                             <separator colspan="4" string="Your Logo - Use a size of about 450x150 pixels."/>
243                             <field colspan="4" name="logo" widget="image"/>
244                         </page>
245                         <page string="Header/Footer" groups="base.group_extended">
246                             <field colspan="4" name="rml_header" nolabel="1"/>
247                         </page>
248                         <page string="Internal Header/Footer" groups="base.group_extended">
249                             <separator string="Portrait" colspan="2"/>
250                             <separator string="Landscape" colspan="2"/>
251                             <field colspan="2" name="rml_header2" nolabel="1"/>
252                             <field colspan="2" name="rml_header3" nolabel="1"/>
253                         </page>
254                         <page string="Configuration">
255                         </page>
256                     </notebook>
257                 </form>
258             </field>
259         </record>
260         <record id="view_company_tree" model="ir.ui.view">
261             <field name="name">res.company.tree</field>
262             <field name="model">res.company</field>
263             <field name="type">tree</field>
264             <field name="field_parent">child_ids</field>
265             <field name="arch" type="xml">
266                 <tree string="Companies">
267                     <field name="name"/>
268                     <field name="partner_id"/>
269                 </tree>
270             </field>
271         </record>
272
273         <record id="view_users_configuration_form" model="ir.ui.view">
274             <field name="name">res.config.users.confirm.form</field>
275             <field name="model">res.config.users</field>
276             <field name="type">form</field>
277             <field name="inherit_id" ref="res_config_view_base"/>
278             <field name="arch" type="xml">
279               <data>
280                 <form position="attributes">
281                   <attribute name="string">Create User</attribute>
282                 </form>
283                 <xpath expr='//separator[@string="title"]' position='attributes'>
284                     <attribute name='string'>New User</attribute>
285               </xpath>
286                 <xpath expr="//label[@string='description']"
287                      position="attributes">
288                 <attribute name="string">Create additional users and assign them groups that will allow them to have access to selected functionalities within the system. Click on 'Done' if you do not wish to add more users at this stage, you can always do this later.</attribute>
289               </xpath>
290               <xpath expr='//separator[@string="vsep"]' position='attributes'>
291                         <attribute name='string'></attribute>
292                     </xpath>
293                 <group string="res_config_contents" position="replace">
294                   <field name="name"/>
295                   <field name="email"/>
296                   <field name="login"/>
297                   <field name="password" password="True"/>
298                   <field name="context_lang"/>
299                   <field name="context_tz"/>
300
301                   <separator string="Group" colspan="4"/>
302                   <label  align="0.0" colspan="4" string="Groups are used to define access rights on objects and the visibility of screens and menus"/>
303                   <field colspan="4" nolabel="1" name="groups_id"/>
304                 </group>
305
306                 <xpath expr='//button[@name="action_next"]'
307                        position='attributes'>
308                   <attribute name="name">action_add</attribute>
309                   <attribute name='string'>Add User</attribute>
310                   <attribute name='icon'>gtk-add</attribute>
311                 </xpath>
312
313                 <xpath expr='//button[@name="action_skip"]'
314                        position='attributes'>
315                   <!-- if this one is performed first, it transforms
316                        the action_skip into action_next, and the
317                        transformation of action_next to action_add,
318                        since it uses first-match, transforms the same
319                        button. And we end up with [add] [next] instead
320                        of [next] [add]
321
322                        Would probably be simpler to just replace both
323                        by nothing and create a pair of brand new
324                        buttons... but we'd have to handle the groups
325                        around the buttons... oh well...
326                   -->
327                   <attribute name="name">action_next</attribute>
328                   <attribute name='string'>Done</attribute>
329                   <attribute name='icon'>gtk-go-forward</attribute>
330                 </xpath>
331               </data>
332             </field>
333         </record>
334
335         <record id="action_config_user_form" model="ir.actions.act_window">
336             <field name="name">Create Users</field>
337             <field name="type">ir.actions.act_window</field>
338             <field name="res_model">res.config.users</field>
339             <field name="view_type">form</field>
340             <field name="view_mode">form</field>
341             <field name="view_id" ref="view_users_configuration_form"/>
342             <field name="target">new</field>
343         </record>
344         
345       <!--     Config Wiz     Give access to others users-->
346         
347         <record id="action_config_access_other_user" model="ir.actions.act_window">
348             <field name="name">Give access to others users</field>
349             <field name="type">ir.actions.act_window</field>
350             <field name="res_model">res.config.users</field>
351             <field name="view_type">form</field>
352             <field name="view_mode">form</field>
353             <field name="view_id" ref="view_users_form"/>
354         </record>
355         
356         <!--   register configuration wizard -->
357
358         <record id="config_wizard_action_config_user_form" model="ir.actions.todo">
359             <field name="action_id" ref="action_config_access_other_user"/>
360             <field name="restart">never</field>
361             <field name="target">current</field>
362             <field name="sequence">1000</field>
363             <field name="state">skip</field>
364         </record>
365
366         <record id="view_confirm_simple_view_form" model="ir.ui.view">
367             <field name="name">Configure Your Interface</field>
368             <field name="model">res.config.view</field>
369             <field name="type">form</field>
370             <field name="inherit_id" ref="res_config_view_base"/>
371             <field name="arch" type="xml">
372               <data>
373                 <form position="attributes">
374                   <attribute name="string">Configure Your Interface</attribute>
375                 </form>
376                 <xpath expr="//label[@string='description']"
377                      position="attributes">
378                 <attribute name="string">If you use OpenERP for the first time we strongly advise you to select the simplified interface, which has less features but is easier. You can always switch later from the user preferences.</attribute>
379               </xpath>
380               <xpath expr='//separator[@string="title"]' position='attributes'>
381                     <attribute name='string'>Configure Your Interface</attribute>
382               </xpath>
383               <xpath expr='//separator[@string="vsep"]' position='attributes'>
384                     <attribute name='string'></attribute>
385                     <attribute name='rowspan'>12</attribute>
386               </xpath>
387                <group string="res_config_contents" position="replace">
388                       <group colspan="4">
389                           <field colspan="4" name="view" nolabel="1"/>
390                     </group>
391                 </group>
392                 <xpath expr='//button[@name="action_skip"]' position='replace'/>
393               </data>
394             </field>
395         </record>
396
397         <record id="action_config_simple_view_form" model="ir.actions.act_window">
398             <field name="name">Configure Your Interface</field>
399             <field name="type">ir.actions.act_window</field>
400             <field name="res_model">res.config.view</field>
401             <field name="view_type">form</field>
402             <field name="view_id" ref="view_confirm_simple_view_form"/>
403             <field name="view_mode">form</field>
404             <field name="target">new</field>
405         </record>
406
407         <record id="config_wizard_step_user" model="ir.actions.todo">
408             <field name="action_id" ref="action_config_user_form"/>
409             <field name="sequence">10</field>
410             <field name="restart">never</field>
411             <field name="state">done</field>
412         </record>
413         <record id="config_wizard_simple_view" model="ir.actions.todo">
414             <field name="action_id" ref="action_config_simple_view_form"/>
415             <field name="restart">on_trigger</field>
416             <field name="sequence">1</field>
417             <field name="state">skip</field>
418         </record>
419         
420 <!--        Define default users preferences-->
421
422        <record id="view_user_preferences_config_form" model="ir.ui.view">
423             <field name="name">Define default users preferences</field>
424             <field name="model">user.preferences.config</field>
425             <field name="type">form</field>
426             <field name="inherit_id" ref="res_config_view_base"/>
427             <field name="arch" type="xml">
428               <data>
429                 <form position="attributes">
430                   <attribute name="string">Define default users preferences</attribute>
431                 </form>
432               <xpath expr='//separator[@string="title"]' position='attributes'>
433                     <attribute name='string'>Define default users preferences</attribute>
434               </xpath>
435               <xpath expr="//label[@string='description']"
436                  position="attributes">
437                 <attribute name="string">Set Timezone,Language,Interface,MenuTip as default for all users by company.</attribute>
438               </xpath>
439               <xpath expr='//separator[@string="vsep"]' position='attributes'>
440                     <attribute name='string'></attribute>
441                     <attribute name='rowspan'>12</attribute>
442               </xpath>
443                <group string="res_config_contents" position="replace">
444                       <group colspan="4">
445                           <field colspan="4" name="company_id" />
446                           <field colspan="4" name="context_tz" />
447                           <field colspan="4" name="context_lang" />
448                           <field colspan="4" name="view" />
449                           <field colspan="4" name="menu_tips" />
450                     </group>
451                 </group>
452               </data>
453             </field>
454         </record>
455
456         <record id="action_user_preferences_config_form" model="ir.actions.act_window">
457             <field name="name">Define default users preferences</field>
458             <field name="type">ir.actions.act_window</field>
459             <field name="res_model">user.preferences.config</field>
460             <field name="view_type">form</field>
461             <field name="view_id" ref="view_user_preferences_config_form"/>
462             <field name="view_mode">form</field>
463             <field name="target">new</field>
464         </record>
465
466         <!--   Register configuration wizard -->
467         
468         <record id="config_action_user_preferences_config_form" model="ir.actions.todo">
469             <field name="action_id" ref="action_user_preferences_config_form"/>
470             <field name="restart">on_trigger</field>
471         </record>
472         
473     </data>
474 </openerp>