From 064a4c0462e68edf89eadee6b5bc7c6508fe30eb Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Thu, 19 Jan 2023 10:59:33 +0700 Subject: new product must have manufacture id (brand) --- indoteknik_api/controllers/api_v1/product.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indoteknik_api/controllers/api_v1') diff --git a/indoteknik_api/controllers/api_v1/product.py b/indoteknik_api/controllers/api_v1/product.py index 78b03203..cfa2dbef 100644 --- a/indoteknik_api/controllers/api_v1/product.py +++ b/indoteknik_api/controllers/api_v1/product.py @@ -28,6 +28,8 @@ class Product(controller.Controller): ('active', '=', True), ('image_128', '!=', False), ('website_description', '!=', False), + # ('write_uid', '!=', 1), + ('x_manufacture', '!=', False), # ('create_date', '>=', delta_time), ] new_products = request.env['product.template'].search(query_products, order='create_date desc', limit=250) @@ -57,6 +59,8 @@ class Product(controller.Controller): ('x_manufacture', '=', brand.id), ('image_128', '!=', False), ('website_description', '!=', False), + # ('write_uid', '!=', 1), + ('x_manufacture', '!=', False), # ('create_date', '>=', delta_time), ] count_products = request.env['product.template'].search_count(query) -- cgit v1.2.3