Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: Add an action in Action Menu
byHi,
wasting so much effort on it last week
there it is,
<act_window id="action_create_picking_from_quant"
multi="True"
view_id="stock_picking_from_stock_quants_view"
key2="client_action_multi" name="Create Picking"
res_model="stock.picking_from_quants"
src_model="stock.quant"
view_mode="form" target="new" view_type="form" />
by my understanding, it gonna create the action (window action) and the matching ir.values
the big part is the key2 field (can be print too and has other value but better look at it here https://github.com/odoo/odoo/blob/10.0/odoo/addons/base/ir/ir_values.py (that module got plenty of comment, for change).
res_model is the model use by the action and src_model is the model on what you want to add an action
in my example, I add action_create_picking_from_quant on all view based on stock.quant, the action is base on model stock.picking_from_quants (a wizard) and use the view stock_picking_from_stock_quants_view
Ben
_______________________________________________
Mailing-List:
https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe