[FIX] website_sale: in the product grid, a product must have min size 1 and max size 4
authorDenis Ledoux <dle@openerp.com>
Tue, 27 May 2014 14:11:27 +0000 (16:11 +0200)
committerDenis Ledoux <dle@openerp.com>
Tue, 27 May 2014 14:11:27 +0000 (16:11 +0200)
addons/website_sale/controllers/main.py

index f258d14..8035903 100644 (file)
@@ -78,8 +78,8 @@ class table_compute(object):
         index = 0
         maxy = 0
         for p in products:
-            x = p.website_size_x
-            y = p.website_size_y
+            x = min(max(p.website_size_x, 1), PPR)
+            y = min(max(p.website_size_y, 1), PPR)
             if index>PPG:
                 x = y = 1