Odoo Help

0

How can i write my own tree view for product.template model?

By
samba
on 2/16/15, 7:30 AM 644 views

"view_id" field in the action to mention "form id ". I want to use my own form, tree, kanban view for product.template model. I am writing my action like this.

<record id="vendorportal_product_action" model="ir.actions.act_window">
            <field name="name">Products</field>
            <field name="res_model">product.template</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,kanban</field>
            <field name="context">{'tree_view_ref' : 'vendorportal_product_tree','form_view_ref' : 'vendorportal_product_form'}</field>
            <field name="view_id" ref="vendorportal_product_form"/>
    </record>

This action perfectly working for form. But it is showing default tree view other than what i have mention in this action.

Can any one tell me where i have written wrong? I have two records. one is for form with the id "vendorportal_product_form" another one is tree with the id "vendorportal_product_tree" for the model product.template.

 

3

Zbik

--Zbik--
6253
| 6 4 7
Lodz, Poland
--Zbik--


Zbik
On 2/16/15, 8:55 AM

Try this, but I'm not sure:

<field name="context">{'tree_view_ref' : 'YOUR_MODULE.vendorportal_product_tree','form_view_ref' : 'YOUR_MODULE.vendorportal_product_form'}</field>

Thank you very much zbik working fine..

samba
on 2/16/15, 9:01 AM

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

1 follower(s)

Stats

Asked: 2/16/15, 7:30 AM
Seen: 644 times
Last updated: 3/16/15, 8:10 AM