Odoo Help

2

0
6 Answers
10
Satrio Wahyu Indonesia
11/23/17, 11:28 PM

HI,
after few days struggling with ir.values problem (since it not exist in Odoo 11), my friend and I have found some solution.

we can use ir.actions.server model and fill binding_model_id field with your target model where that menu want to be added (e.g if you want to place some action menu in purchase.order model so you just fill binding_model_id with purchase.order model. And for code field which is usually we use it for calling python function we fill with "model.your_python_function()"

for more clear answer to sample code is like this :

================ XML File ================
<record id="action_server_learn_skill" model="ir.actions.server">
<field name="name">Learning</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="your_module_folder_name.model_your_model" />
<field name="binding_model_id" ref="module_folder_name.model_your_target_model" />
<field name="state">code</field>
<field name="code">model.action_learn()</field>
</record>

Hope my solution will give you a little help :)    

0
Avatar

NZOUENDJOU NANA Guy-Clovis France

--NZOUENDJOU NANA Guy-Clovis--
--NZOUENDJOU NANA Guy-Clovis--

Expert en informatique et Système d'information

Développeur Python / Odoo

Consultant fonctionnel Odoo

NZOUENDJOU NANA Guy-Clovis France
7/24/18, 4:06 AM

In Odoo 11.0, ir.values is replace by binding_model_id in ir_actions 

in your ir_actions xml file, binding_model_id field like this

    <field name="binding_model_id" ref="module_folder_name.model_your_target_model" />
0
Avatar

Waleed Mohsen Yemen

--Waleed Mohsen--

4320
| 5 3 7
Sana'a, Yemen
--Waleed Mohsen--


Waleed Mohsen Yemen
1/2/18, 3:31 PM


Ask a Question
Writer
Keep Informed
2 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now