Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Why could we use website.pager in website_sale.products and not in website_sale.product?

Pascal Tremblay
on 11/9/15, 3:19 PM 770 views

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"/>


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?



Pascal Tremblay

--Pascal Tremblay--
| 5 2 7
Alma, Canada
--Pascal Tremblay--

Pascal Tremblay
On 11/9/15, 9:42 PM

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 11/9/15, 3:19 PM
Seen: 770 times
Last updated: 11/9/15, 9:42 PM