~jamesj/openobject-addons/c2c_budget_fixes

« back to all changes in this revision

Viewing changes to memento_idea/wizard/cleanup.xml

  • Committer: Olivier Dony
  • Date: 2009-12-11 20:35:27 UTC
  • mto: This revision was merged to the branch mainline in revision 4138.
  • Revision ID: odo@openerp.com-20091211203527-uyy87u8irofxfe0e
[ADD] New 'memento_idea' module, an example module part of the OpenERP Technical Memento

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?>
 
2
<openerp>
 
3
    <data>
 
4
        <record id="wizard_idea_cleanup" model="ir.ui.view">
 
5
            <field name="name">memento_idea.cleanup.wizard.form</field> 
 
6
            <field name="model">memento_idea.cleanup.wizard</field> 
 
7
            <field name="type">form</field> 
 
8
            <field name="arch" type="xml">
 
9
                <form string="Idea Cleanup Wizard">
 
10
                    <label colspan="4" string="Select the age (in days) of ideas to cleanup"/>
 
11
                    <field name="idea_age"/>
 
12
                    <group colspan="4">
 
13
                        <button string="Cancel" special="cancel" icon="gtk-cancel"/>
 
14
                        <button string="Cleanup" name="do_cleanup" type="object" icon="gtk-ok"/>
 
15
                    </group>
 
16
                </form>
 
17
            </field>
 
18
        </record>
 
19
 
 
20
        <record id="action_idea_cleanup_wizard" model="ir.actions.act_window">
 
21
            <field name="name">Cleanup</field>
 
22
            <field name="type">ir.actions.act_window</field>
 
23
            <field name="res_model">memento_idea.cleanup.wizard</field>
 
24
            <field name="src_model">memento_idea.idea</field>
 
25
            <field name="view_type">form</field>
 
26
            <field name="view_mode">form</field>
 
27
            <field name="target">new</field>
 
28
        </record>
 
29
        
 
30
        <record id="ir_open_cleanup_wizard" model="ir.values">
 
31
            <field name="key2">client_action_multi</field>
 
32
            <field name="model">memento_idea.idea</field>
 
33
            <field name="name">Cleanup Wiz</field>
 
34
            <field eval="'ir.actions.act_window,%d'%action_idea_cleanup_wizard" name="value"/>
 
35
            <field eval="True" name="object"/>
 
36
        </record>
 
37
        
 
38
        <menuitem id="menu_memento_idea_cleanup" 
 
39
                parent="menu_memento_idea" 
 
40
                sequence="40" 
 
41
                action="action_idea_cleanup_wizard"/>
 
42
    </data>
 
43
    
 
44
                
 
45
 
 
46
        <!--  Just to show how it is done, let's add this cleanup wizard 
 
47
          as a 'config wizard'.
 
48
          Of course it does not make sense to cleanup ideas at startup.
 
49
     -->        
 
50
        <data noupdate="1">
 
51
        <record id="config_wizard_cleanup" model="ir.actions.todo">
 
52
            <field name="name">Ideas (Memento)</field>
 
53
            <field name="note">This module does not implement a real functional specification.
 
54
It contains the source of most examples used in the Technical Memento for OpenERP, and
 
55
can be used as a reference combining all code excerpts into a working module.
 
56
 
 
57
For instance, this startup wizard (Cleanup) is merely an example, because there
 
58
is no real use for Ideas cleanup at the module installation!              
 
59
 
 
60
(The XML source for this config wizard can be found at the bottom of wizard/cleanup.xml
 
61
in the source of the memento_idea module)
 
62
            </field>
 
63
            <field name="action_id" ref="action_idea_cleanup_wizard"/>
 
64
            <field name="sequence">10</field>
 
65
        </record>
 
66
    </data>
 
67
    
 
68
</openerp>
 
69