[ADD] inheritable view for config items
authorXavier Morel <xmo@tinyerp.com>
Tue, 8 Dec 2009 13:09:44 +0000 (14:09 +0100)
committerXavier Morel <xmo@tinyerp.com>
Tue, 8 Dec 2009 13:09:44 +0000 (14:09 +0100)
bzr revid: xmo@tinyerp.com-20091208130944-7r0a19wvj3jxygnz

bin/addons/base/__terp__.py
bin/addons/base/base_update.xml
bin/addons/base/res/res_config.xml [new file with mode: 0644]

index 186271d..8c2ccda 100644 (file)
@@ -33,6 +33,7 @@
         'base_menu.xml',
         'security/base_security.xml',
         'res/res_security.xml',
+        'res/res_config.xml',
         'maintenance/maintenance_security.xml'
     ],
     'update_xml': [
index c6007f1..c856561 100644 (file)
             <field name="name">res.users.confirm.simple_view</field>
             <field name="model">res.config.view</field>
             <field name="type">form</field>
+            <field name="inherit_id" ref="res_config_view_base"/>
             <field name="arch" type="xml">
-                <form string="Configure simple view">
+              <data>
+                <form position="attributes">
+                  <attribute name="string">Select your Interface</attribute>
+                </form>
+
+                <group string="res_config_contents" position="replace">
                   <label colspan="4" align="0.0" string='
-                    Choose between the "Simplified Interface" or the extended one.
-                    If you are testing or using OpenERP for the first time, we suggest you to use
+                    Choose between the simplified interface and the extended one.
+                    If you are testing or using OpenERP for the first time, we suggest you use
                     the simplified interface, which has less options and fields but is easier to
                     understand. You will be able to switch to the extended view later.
-                  '/>
-                    <separator string="Choose Your Mode" colspan="4"/>
-                    <field colspan="2" name="view"/>
-                    <separator string="" colspan="4"/>
-
-                    <field name="progress" widget="progressbar" nolabel="1"
-                           colspan="1" />
-                    <label string='' colspan='1'/>
-                    <group colspan="2" col="2">
-                        <button name="action_next" icon="gtk-ok"
-                                string="Set" type="object"/>
-                    </group>
-                </form>
+                    '/>
+                  <separator string="Choose Your Mode" colspan="4"/>
+                  <field colspan="2" name="view"/>
+                </group>
+                <xpath expr='//button[@name="action_skip"]' position='replace'/>
+                <xpath expr='//button[@name="action_next"]' position='attributes'>
+                  <attribute name='string'>Set</attribute>
+                </xpath>
+              </data>
             </field>
         </record>
 
             <field name="type">ir.actions.act_window</field>
             <field name="res_model">res.config.view</field>
             <field name="view_type">form</field>
+            <field name="view_id" ref="view_confirm_simple_view_form"/>
             <field name="view_mode">form</field>
             <field name="target">new</field>
         </record>
diff --git a/bin/addons/base/res/res_config.xml b/bin/addons/base/res/res_config.xml
new file mode 100644 (file)
index 0000000..b193dae
--- /dev/null
@@ -0,0 +1,24 @@
+<openerp>
+  <data>
+    <record id="res_config_view_base" model="ir.ui.view">
+      <field name="name">res.config.view.base</field>
+      <field name="model">res.config</field>
+      <field name="type">form</field>
+      <field name="arch" type="xml">
+        <form>
+          <group string="res_config_contents">
+          </group>
+          <separator string="" colspan="4"/>
+          <field name="progress" widget="progressbar" nolabel="1" colspan="1"/>
+          <label string="" colspan="1"/>
+          <group colspan="2" col="4">
+            <button name="action_skip" icon="gtk-cancel" special="cancel"
+                    type="object" string="Skip"/>
+            <button name="action_next" icon="gtk-ok"
+                    type="object" string="Record"/>
+          </group>
+        </form>
+      </field>
+    </record>
+  </data>
+</openerp>