This question has been flagged
1 Reply
2880 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.

 

Avatar
Discard
Best Answer

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>

Avatar
Discard
Author

Thank you very much zbik working fine..