I don't have v6, but this works in v7:
<record id="action_id_name" model="ir.actions.server">
<field name="name">Name that shows in More button</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_blah_blah"/>
<field name="state">code</field>
<field name="code">self.some_custom_code(cr, uid, context.get('active_ids'), ..., context=context)</field>
</record>
<record id="value_id_name" model="ir.values">
<field name="name">Name</field>
<field name="action_id" ref="action_id_name"/>
<field name="value" eval="'ir.actions.server,' + str(ref('action_id_name'))"/>
<field name="key">action</field>
<field name="model_id" ref="model_blah_blah"/>
<field name="model">blah.blah</field>
<field name="key2">client_action_multi</field>
</record>
def some_custom_code(self, cursor, uid, ids, ..., context):
# possibly do some processing
# maybe with the ... extra fields you added
#
# post your changes, either with an sql statement or by calling
# self.write(...)
return True
The names that you should replace with actual values:
action_id_name
: the id for your action record
Name that shows in More button
: whatever you want to show in the button
model_blah_blah
: the name of the model used (should match whatever is found in your security/ir.model.access.csv
file)
some_custom_code
: the name of the function in your model
value_id_name
: the id of your action's value record
Name
: a name (not sure where it shows up)
blah.blah
: the name your model
and table
in OpenERP notation
...
: any extra arguments/parameters you add