Odoo Help

0

Two list views the same model and two tree_but_open

By
Zbik
on 11/25/16, 1:35 PM 459 views

How to solve this problem:

I have two list views filtered by domain value:

<record model="ir.actions.act_window" id="action_my_model_AA">
  <field name="name">My model AA</field>
  <field name="res_model">my.model</field>
  <field name="view_type">tree</field>
  <field name="domain">[('field','=','AA')]</field>
  <field name="view_id" ref="view_my_model_tree"/>
</record>


<record model="ir.actions.act_window" id="action_my_model_AA">
 <field name="name">My model BB</field>
<field name="res_model">my.model</field>
 <field name="view_type">tree</field>
<field name="domain">[('field','=','BB')]</field>
<field name="view_id" ref="view_my_model_tree"/>
</record>

and I need TWO tree_but_open actions, separately for both list (two different res_model), like this:

<act_window        id="action_aa"       
    name="Action AA"       
    res_model="other.model.aa"       
    src_model="my.model"       
    view_id="my_other_model_aa_view"
    key2="tree_but_open"/>

<act_window        id="action_bb"
    name="Action BB"       
    res_model="other.model.bb"
   src_model="my.model"
   view_id="my_other_model_bb_view"
   key2="tree_but_open"/>

now only one of them is triggered!

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

Question tools

2 follower(s)

Stats

Asked: 11/25/16, 1:35 PM
Seen: 459 times
Last updated: 6/14/17, 7:55 PM