Odoo Help

Welcome!

This community 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.

0

Two list views the same model and two tree_but_open

By
zbik
on 11/25/16, 1:35 PM 88 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!

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/25/16, 1:35 PM
Seen: 88 times
Last updated: 11/25/16, 1:35 PM