|
@@ -33,7 +33,7 @@ class StockInventory(models.Model):
|
|
product_obj = self.env['product.product']
|
|
product_obj = self.env['product.product']
|
|
categ_obj = self.env['product.category']
|
|
categ_obj = self.env['product.category']
|
|
categories = categ_obj.search([('id', 'child_of', [inventory.category_id.id])])
|
|
categories = categ_obj.search([('id', 'child_of', [inventory.category_id.id])])
|
|
- sql = "SELECT pp.id as product_id, pc.id as category_id FROM product_product as pp INNER JOIN product_template as pt ON pp.product_tmpl_id = pt.id INNER JOIN product_category as pc ON pt.categ_id = pc.id WHERE pt.type = 'product' and pc.id IN %s"
|
|
|
|
|
|
+ sql = "SELECT pp.id as product_id, pc.id as category_id FROM product_product as pp INNER JOIN product_template as pt ON pp.product_tmpl_id = pt.id INNER JOIN product_category as pc ON pt.categ_id = pc.id WHERE pp.active = true and pt.type = 'product' and pc.id IN %s"
|
|
|
|
|
|
self.env.cr.execute(sql, (tuple(categories.ids),))
|
|
self.env.cr.execute(sql, (tuple(categories.ids),))
|
|
vals = []
|
|
vals = []
|