Server action方面,如何用菜单调用一个method
-
xml是这么写的,但是不行
[code]
<!-- 菜单和Action -->
<record model="ir.actions.server" id="action_taobao_product_synchronize">
<field name="name">同步淘宝</field>
<field name="model_id">95</field>
<field name="type">ir.actions.server</field>
<field name="condition">True</field>
<field name="state">code</field>
<field name="code">
# 测试代码
# - object
# - time
# - cr
# - uid
# - ids
# If you plan to return an action, assign: action = {...}</field> </record> <menuitem id="menu_taobao_upload" action="action_taobao_product_synchronize" name="上传淘宝" parent="product.menu_main_product" icon="STOCK_EXECUTE" />
[/code]