Odoo Help


[v8.0] Ecommerce Grid is 4 columns by default. Where is this value set and how can we change it?

on 7/30/14, 3:30 PM 1,886 views

Wondering if it is possible to increase the number of columns to show more products per row.

Paul Catinean
On 9/18/15, 9:30 AM

Those constants are meant to be overridden by a module

Simply import the main controller with:

from openerp.addons.website_sale.controllers import main

then change the values

main.PPR = your_nr

main.PPG = your_nr



On 8/1/14, 4:28 PM

Found it hardcoded at line 11 of /website_sale/controllers/main.py

PPR = 4  # Products Per Row

Probably want to make sure it's divisible by the amount set on line 10

PPG = 20 # Products Per Page

Still not sure how to override this without changing the core file...

It looks like changing this value is not having any effect though...

on 8/1/14, 4:42 PM

@grayson, I'm also trying to figure this out. I think you may need to override it in your theme's layout.xml. I'll post back here once I figure it out. Are you using a custom theme module, or the built-in bootswatch templates?

Luke Branch
on 8/1/14, 10:05 PM

@grayson, changing the value in /website_sale/controllers/main.py definitely has an affect, but i've found it only works after a server reboot (eg. change PPR = 5, save and reboot machine). I'll write back with an answer once I figure out how to override the default controller within a custom theme module.

Luke Branch
on 8/2/14, 7:36 AM

@Luke, thanks for pitching in. I'll try rebooting and see what happens...

on 8/6/14, 1:07 PM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 7/30/14, 3:30 PM
Seen: 1886 times
Last updated: 9/18/15, 11:44 PM