تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
5742 أدوات العرض

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
فبراير 25
1030
1
يناير 24
1979
0
أغسطس 16
3362
0
مارس 25
1214
2
سبتمبر 24
1214