我想改变action
按钮下拉菜单与adding
或deleting
在stock.move class
子菜单(或更改导出功能),但我找不到在哪里描述按钮"action"
与"export"
和"delete"
下拉菜单中xml
的地方。据我所知,它必须是记录模型= "ir.actions.act_window"
和tree
视图。Odoo 9哪里可以找到stock.move xml中的动作按钮下拉菜单?
我谈论这个菜单:
http://www.part.lt/img/thumb/5ca9481df84ab612afc0ccacb2f25581446.png
我有这些XML的主营stock
插件:
<record id="act_product_stock_move_open" model="ir.actions.act_window">
<field name="context">{'search_default_product_id': active_id, 'default_product_id': active_id}</field>
<field name="name">Moves</field>
<field name="res_model">stock.move</field>
<field name="view_id" ref="stock.view_move_tree"/>
</record>
<record id="action_move_form2" model="ir.actions.act_window">
<field name="name">Stock Moves</field>
<field name="res_model">stock.move</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_move_search"/>
<field name="context">{}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a stock movement.
</p><p>
This menu gives you the full traceability of inventory
operations on a specific product. You can filter on the product
to see all the past or future movements for the product.
</p>
</field>
</record>
<record model="ir.actions.act_window.view" id="action_stock_move_tree_all">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_move_tree"/>
<field name="act_window_id" ref="action_move_form2"/>
</record>
<record model="ir.actions.act_window.view" id="action_stock_move_form_all">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_move_form"/>
<field name="act_window_id" ref="action_move_form2"/>
</record>
<record model="ir.actions.act_window.view" id="action_stock_move_graph_all">
<field name="sequence" eval="3"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_move_graph"/>
<field name="act_window_id" ref="action_move_form2"/>
</record>
也许我在正确的地方寻找呢?
谢谢。因此,如果我想在stock.move类的“Action”下拉列表中添加一个更多的函数,那么我必须用ir.actions.act_window重写stock.xml? – fueggit
我已更新我的答案已编辑:用于在选项中添加新值 – prakash