我尽力了,当点击按钮然后从这个状态到不同的状态但点击按钮没有任何反应,我真的很失望
<button name="" />
我看到了我所有的代码,没有发现错误,大家帮我 编码 Python.py
_columns = {
'name': fields.char('Name', size=64, required=True),
'state': fields.selection ([('taomoi', 'Tao Moi'),
('choxemxet', 'Cho Xem Xet'),
('huy', 'Huy'),
('chopheduyet', 'Cho Phe Duyet'),
], 'status', readonly=False)
**workflow.xml**
<!-- Activity -->
<record id="act_taomoi" model="workflow.activity">
<field name="wkf_id" ref="wkl_tangluong" />
<field name="flow_start">True</field>
<field name="name">taomoi</field>
<field name="kind">function</field>
<field name="action">action_moitao()</field>
</record>
<record id="act_choxemxet" model="workflow.activity">
<field name="wkf_id" ref="wkl_tangluong" />
<field name="name">choxemxet</field>
<field name="kind">function</field>
<field name="action">action_choxemxet()</field>
</record>
<record id="act_huy" model="workflow.activity">
<field name="wkf_id" ref="wkl_tangluong" />
<field name="name">huy</field>
<field name="flowstop">True</field>
<field name="kind">stopall</field>
<field name="action">action_huy()</field>
</record>
<record id="act_chopheduyet" model="workflow.activity">
<field name="wkf_id" ref="wkl_tangluong" />
<field name="name">chopheduyet</field>
<field name="kind">function</field>
<field name="action">action_chopheduyet()</field>
</record>
<!-- Transition -->
<record model="workflow.transition" id="t1">
<field name="act_from" ref="act_taomoi" />
<field name="act_to" ref="act_choxemxet" />
<field name="signal">salary_dexuatduoctao</field>
</record>
<record id="t2" model="workflow.transition">
<field name="act_from" ref="act_choxemxet" />
<field name="act_to" ref="act_huy" />
<field name="signal">salary_huydexuat</field>
</record>
<record id="t3" model="workflow.transition">
<field name="act_from" ref="act_choxemxet" />
<field name="act_to" ref="act_chopheduyet" />
<field name="signal">salary_dexuat</field>
</record>
</data>
</openerp>
**view.xml**
<button name="salary_dexuatduoctao" string="cho xem xet"
states="taomoi" />
<button name="salary_huydexuat" string="huy" states="choxemxet" />
<button name="tangluong_dexuat" string="chopheduyet"
这是我在 openerp 中传输状态的代码,但是单击按钮然后什么也没有发生。这里包括 3 个文件:python.py、view.xml 和 workflow.xml