简单的状态的写入是可以在xml中写的(系统sale模块的写法。)
<record id="act_sent" model="workflow.activity">
<field name="wkf_id" ref="wkf_sale"/>
<field name="name">sent</field>
<field name="kind">function</field>
<field name="action">write({'state':'sent'})</field>
</record>