Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Add an action in Action Menu

by
Benoît Vézina
- 27/03/2017 14:20:07

Hi,

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


Le 2017-03-27 à 08:08, Michael Delvoye a écrit :
<blockquote cite="mid:CADMZLWebcJ94-W6TQV8XjDwEzDZHv4YELfeWKMo8n2rhR2cMzQ@mail.gmail.com" type="cite">
Hi,
I prepare a module that create qrcode for my products.
I created an action that create the image for my product and i try to put an action on the action Menu so as to call this python method  for n products.

But i don't know how to add a new action in this special menu.
I try to find the way to do that with the action : Archive of res.partner but i'm lost.

Could you give me some information about this ?

Thanks for help



--
Michael Delvoye
Directeur Technique
MISYL SERVICES

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe


Reference