Members mailing list archives

members@odoo-community.org

Re: view_type tree AND open a form view when clicking on a record

by
Serpent Consulting Services
- 07/12/2015 07:15:07
Arnaud,

It would be easy:

See the existing code in product/product_view.xml
<record id="ir_product_category_open" model="ir.values">
            <field eval="'tree_but_open'" name="key2"/>
            <field eval="'product.category'" name="model"/>
            <field name="name">Products by Categories</field>
            <field eval="'ir.actions.act_window,%d'%product_normal_action_tree" name="value"/>
        </record>


-----------------Should be, for you-----------
 <field eval="'ir.actions.act_window,%d'%ACTION_TO_OPEN_FORM" name="value"/>

So, you simply need to create an action which will open the view as needed.

Thanks.

On Mon, Dec 7, 2015 at 1:23 AM, GAY Arnaud - LuxProject <agay@luxproject-development.lu> wrote:
Hi all,

I try to understand how to open a from when clicking on a tree view_type.

We have some examples on product category tree view (click open product 
view), or account.analytic.account (cick open account analytic lines).

So, no trouble to create beautifull tree, but nothink hapened when click 
on record.

Somes ideas ?

Thanks

-- 
Salutations,

Arnaud GAY
LuxProject SA
+33 7 82 93 84 00

_______________________________________________
Mailing-List: http://odoo-community.org/groups/members-4
Post to: mailto:members@odoo-community.org
Unsubscribe: http://odoo-community.org/groups?unsubscribe




--
The Splendid journey of 2 years in Numbers
---
Regards,
----------------------------------------------------------------------------------------------------------------------------
Jay Vora
Managing Director


 
Direct: +91-9879354457
Office: +91-9033472982
Skype: jaynvora
Twitter : jaynvora
   
-------------------------------------------------------------------------------------------------
Visit our website : http://www.serpentcs.com
Please consider the environment before printing this email