[IMP] use generic header template in form views
authorXavier Morel <xmo@openerp.com>
Tue, 2 Oct 2012 14:27:21 +0000 (16:27 +0200)
committerXavier Morel <xmo@openerp.com>
Tue, 2 Oct 2012 14:27:21 +0000 (16:27 +0200)
also small reindent in view with fucked-up indentation

bzr revid: xmo@openerp.com-20121002142721-u9hlw4ob04wahu50

openerp/addons/base/ir/ir.xml
openerp/addons/base/module/wizard/base_module_upgrade.py
openerp/addons/base/res/res_widget_view.xml

index 3189870..2f25f24 100644 (file)
             <field name="model">ir.translation</field>
             <field name="arch" type="xml">
                 <form string="Translations" version="7.0">
-                   <header>
+                    <t t-call="ui.Header">
                         <field name="state" widget="statusbar" nolabel="1"/>
-                   </header>
+                    </t>
                    <sheet>
                     <group>
                         <group>
             <field name="name">Config Wizard Steps</field>
             <field name="arch" type="xml">
                 <form string="Config Wizard Steps" version="7.0">
-                  <header>
+                    <t t-call="ui.Header">
                         <button name="action_launch"
-                            states="open" string="Launch"
-                            type="object" icon="gtk-execute" class="oe_highlight" 
-                            help="Launch Configuration Wizard"/>
+                                states="open" string="Launch"
+                                type="object" icon="gtk-execute"
+                                class="oe_highlight"
+                                help="Launch Configuration Wizard"/>
                         <button name="action_open" states="done"
-                            string="Set as Todo" type="object"
-                            icon="gtk-convert" class="oe_highlight"/>
-                        <field name="state" widget="statusbar" statusbar_visible="open,done" nolabel="1" readonly="1" statusbar_colors='{"open":"red","done":"blue"}'/>
-                  </header>
-                  <sheet>
-                    <group col="4">
-                        <field name="action_id"/>
-                        <field name="type"/>
-                        <field name="sequence"/>
-                    </group>
-                    <group string="Groups">
-                        <field name="groups_id" nolabel="1" colspan="4"/>
-                    </group>
-                  </sheet>
+                                string="Set as Todo" type="object"
+                                icon="gtk-convert" class="oe_highlight"/>
+                        <field name="state" widget="statusbar"
+                               statusbar_visible="open,done" nolabel="1"
+                               readonly="1"
+                               statusbar_colors='{"open":"red","done":"blue"}'/>
+                    </t>
+                    <sheet>
+                        <group col="4">
+                            <field name="action_id"/>
+                            <field name="type"/>
+                            <field name="sequence"/>
+                        </group>
+                        <group string="Groups">
+                            <field name="groups_id" nolabel="1" colspan="4"/>
+                        </group>
+                    </sheet>
                 </form>
             </field>
         </record>
index 04b7e78..98ea0ac 100644 (file)
@@ -47,10 +47,10 @@ class base_module_upgrade(osv.osv_memory):
         ids = self.get_module_list(cr, uid, context=context)
         if not ids:
             res['arch'] = '''<form string="Apply Schedule Upgrade" version="7.0">
-                                <header>
+                                <t t-call="ui.Header">
                                     <button name="config" string="Start configuration" type="object" icon="gtk-ok"/>
                                     <button special="cancel" string="Close" icon="gtk-cancel"/>
-                                </header>
+                                </t>
                                 <separator string="Apply Schedule Upgrade" colspan="4"/>
                              </form>'''
 
index bad582f..764f319 100644 (file)
             <field name="model">res.widget.wizard</field>
             <field name="arch" type="xml">
                 <form string="Widget Wizard" col="4" version="7.0">
-                    <header>
+                    <t t-call="ui.Header">
                         <button name="res_widget_add" string="Add" type="object" class="oe_highlight"/>
                         or
                         <button string="Cancel" class="oe_link" special="cancel" />
-                    </header>
+                    </t>
                     <group>
                         <field name="widgets_list"/>
                     </group>