Преглед на файлове

[FIX] product with non zero standard price

Gogs преди 7 години
родител
ревизия
4a77f41580
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      controllers/main.py

+ 1 - 1
controllers/main.py

@@ -144,7 +144,7 @@ class Purchases(http.Controller):
                 'imageMedium': variant.image_medium,
                 'standardPrice': variant.standard_price
             } for variant in product.product_variant_ids if variant.active]
-        } for product in request.env['product.template'].search([('purchase_ok', '=', True), ('active', '=', True)])]
+        } for product in request.env['product.template'].search([('purchase_ok', '=', True), ('standard_price', '>', 0), ('active', '=', True)])]
 
     '''
         Get all incoming and active picking types