Hi,
I need to migrate module from Odoo 8 to Odoo 11. I have some problem with some model in XML code, in Odoo 8 we can use ir.values and this model have field named "value" which can be filled with some actions (e.g: ir.actions.server + str(ref(action_id_from_ir_actions_server))). But in Odoo 11 I cannot find any similar model with this ir.values, I have try to read documentation but I cannot find what I need. Any idea for this ir.values in Odoo 11?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
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 :)
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" />
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
|
2
sep. 19
|
5136 | ||
|
4
nov. 18
|
5984 | ||
|
2
feb. 24
|
3289 | ||
|
1
aug. 23
|
4888 | ||
|
2
dec. 22
|
6357 |
in Odoo v11 , ir.values is replaced by ir.defaults and two extra fields in actions ,
*binding_type
*binding_model_id
Hi Niyas, yes I have try used binding_model_id but I think it used to reference some model and how can I do this ir.actions.server + str(ref(action_id_from_ir_actions_server))? How about ir.actions.todo model? Can I use this model?