[IMP] Use a selection field for the values of the key2 field in the
authorStephane Wirtel <stephane@openerp.com>
Wed, 2 Jun 2010 07:03:46 +0000 (09:03 +0200)
committerStephane Wirtel <stephane@openerp.com>
Wed, 2 Jun 2010 07:03:46 +0000 (09:03 +0200)
ir.values (more user-friendly)

bzr revid: stephane@openerp.com-20100602070346-m60ksjduj6uz9pg0

bin/addons/base/ir/ir.xml
bin/addons/base/ir/ir_values.py

index 828b553..fe4740e 100644 (file)
@@ -18,9 +18,6 @@
                         <field name="model" select="1" required="1"/>
                         <field name="res_id"/>
                         <field name="key2" select="2" required="1"/>
-                        <separator string="Values for Event Type" colspan="2"/>
-                        <label string="client_action_multi, client_action_relate" colspan="2"/>
-                        <label string="tree_but_action, client_print_multi"  colspan="2"/>
                     </group>
                     <group col="2" colspan="2">
                         <separator string="Action To Launch" colspan="2"/>
index 4c26596..97f6f75 100644 (file)
@@ -75,8 +75,13 @@ class ir_values(osv.osv):
             method=True, type='text', string='Value'),
         'object': fields.boolean('Is Object'),
         'key': fields.selection([('action','Action'),('default','Default')], 'Type', size=128),
-        'key2': fields.char('Event Type', size=256,
-            help="The kind of action or button in the client side that will trigger the action."),
+        'key2' : fields.selection([('client_action_multi', 'client_action_multi'),
+                                   ('client_action_relate', 'client_action_relate'),
+                                   ('tree_but_open', 'tree_but_open'),
+                                   ('tree_but_action', 'tree_but_action'),
+                                   ('client_print_multi', 'client_print_multi')],
+                                  'Event Type',
+                                  help="The kind of action or button in the client side that will trigger the action."),
         'meta': fields.text('Meta Datas'),
         'meta_unpickle': fields.function(_value_unpickle, fnct_inv=_value_pickle,
             method=True, type='text', string='Metadata'),