[IMP] website_sale: respect view mode on action website product

Before this commit:
Going to Website / Products
--> Products will open `tree` at first position while it should open `kanban`
view based on given `view_mode`.

After this commit:
>e remove explicit `view_id` and add view ref in `context` so it opens `kanban`
at first and respects given view_id as well.

This commit closes #50349

closes odoo/odoo#61273

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
Swapnesh Shah
2020-11-03 14:05:06 +00:00
committed by Jeremy Kersten
parent b66c4fd0f7
commit 144dd15505
+3 -3
View File
@@ -55,10 +55,10 @@
<record id="product_template_action_website" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">product.template</field>
<field name="view_mode">kanban,tree,form,activity</field>
<field name="view_id" ref="product_template_view_tree_website_sale"/>
<field name="view_mode">tree,kanban,form,activity</field>
<field name="view_id"/>
<field name="search_view_id" ref="product_template_search_view_website"/>
<field name="context">{'search_default_published': 1}</field>
<field name="context">{'search_default_published': 1, 'tree_view_ref':'website_sale.product_template_view_tree_website_sale'}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new product