跳至内容
菜单
此问题已终结
5151 查看

In odoo website we can switch views from grid to list view for products list. But one view gets fixed for such case.

How can we have both views for the product list so that we can toggle views?

Is there any built in function or should we develop it?

形象
丢弃

Not built in, but easy to implément

编写者

Can you suggest how? I don't want to load the whole page when views changed. Thanks

编写者

I have found two views:

<div class="col-md-12" id="products_grid">

<table width="100%">

............

<t t-foreach="products" t-as="product">

<div class="oe_product oe_list oe_product_cart" t-att-data-publish="product.website_published and 'on' or 'off'">

</div>

How to toggle them?

相关帖文 回复 查看 活动
1
2月 25
422
1
1月 24
1404
0
8月 16
2907
0
3月 25
608
2
9月 24
743