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

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

By
samba
on 2/16/15, 7:30 AM 510 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--
5941
| 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

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: 2/16/15, 7:30 AM
Seen: 510 times
Last updated: 3/16/15, 8:10 AM