Skip to Content
Menú
This question has been flagged
1 Respondre
6035 Vistes

Hello guys,

I'm doing some tests and I

In the template website_sale.products, we have this code :

    <div class="products_pager">
        <t t-call="website.pager"/>
    </div>

 

When we try to put this same code in website_sale.product, we get an error :

[...]

QWebException: "'NoneType' object has no attribute '__getitem__'" while evaluating

"pager['page_count'] > 1"


What is the conditions to respect to use website.pager template in website_sale.product?

I know that all the definition of the pager method is in odoo-8.0-20151022/openerp/addons/website/models/website.py. But I don't manage to use the pager method in website_sale.product...

A tip?

Thanks


Avatar
Descartar
Autor Best Answer

In the file odoo-8.0-20151022/openerp/addons/website_sale/controllers/main.py

a new pager is defined at the line 

 pager = request.website.pager(url=url, total=product_count, page=page, step=PPG, scope=7, url_args=post)

this is the pager used when we call the url /shop.

I will define a new pager_new who will be called with the url /shop/product/... 

It should do the job.

Avatar
Descartar
Related Posts Respostes Vistes Activitat
3
de set. 16
5668
0
de març 15
3611
2
de juny 25
1523
2
de maig 25
1069
0
de març 25
1376