There are three ways to add functionality on buttons in OpenERP/Odoo:
1. Call function directly on button:
You can directly call the function defined in model/class using type="object" attribute.
<button string="Check availability" name="check_username_availability" type="object" class="oe_highlight" />
In this case you have to define 'check_username_availablilty' function in model.
2. Using Workflow:
Workflow is the most used functionality in OpenERP/Odoo to process flow of the activity.
Default type of button is workflow i.e type="workflow"
<button string="Accept" name="signal_accept" type="workflow" class="oe_highlight" />
3. Using action:
You have to use type="action" if you want to call any action defined in the .xml file.
For example if you want to open any wizard you can use following code snippet:
<button name="%(action_id)d" string="Button Label" type="action">
or you can replace %(action_id)d with action id from database.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!