2
votes

Information: Odoo v9 (Windows 10)

I'm quite new to Odoo development and i can't seem to get a grip of it.. sadly.

My problem is that i have no clue how i can create a custom action menu item. I have tried Google quite a few times but i never quite arrived at a solution or example that would give me a hint... at all!

Specific details about my problem: I would like to add a custom menu entry in the "Sales Orders" Overview.

There is a menu in the middle which states "Print" and "Action". I would like to add a custom entry to "Action"... But i have no idea how to go about it.

I'm sorry if this question was asked already - I was unable to find anything related on the web.

A example would be greatly appreciated!

Thank you all in advance for your help! :)

2

2 Answers

1
votes

an example :

<act_window
            name="Entries"
            id="act_account_acount_move_line_open"
            res_model="account.move.line"
            src_model="account.account"
            context="{'default_account_id': active_id}"
            />

What should you know :

src_model : define witch model that this action will be added to it's more or action menu

res_model: is the model of the action

in context it's passing a default value ot m2o acount_id witch is the record shown on the current form.

0
votes
 <act_window id="give a unique name as id"
                name="give a name"
                src_model=""
                res_model=""
                view_type="form" 
                view_mode="form"
                key2="client_action_multi"
                target="new"
                groups=""/>

src_model = which particular model you want action res_model = model to views is to be presented in action

groups is optional,view mode is also optional