参考
https://github.com/odoo/odoodays-2014/blob/master/smart_buttons/index.rst
name: the name of the function to call when the button is pressed. In the case it’s an object function, it must take 4 arguments:
states: a comma-separated list of states (from the state field or from the workflow) in which the button must appear. If the states attribute is not given, the button is always visible.
type: this attribute can have 3 values – “workflow” (value by default): the function to call is a function of workflow
Example
<button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-execute" />