我想改變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