Commit 8ac58d10 by Yvon Kerdoncuff

product_template.state becomes product_template.active

parent 4b8c7505
......@@ -651,7 +651,7 @@ class CagetteProducts(models.Model):
# Get products templates
f = [
"id",
"state",
"active",
"name",
"default_code",
"qty_available",
......@@ -666,10 +666,8 @@ class CagetteProducts(models.Model):
c = [['id', 'in', ptids], ['purchase_ok', '=', True], ['active', '=', True]]
products_t = api.search_read('product.template', c, f)
# state is no more in product_template table
# filtered_products_t = [p for p in products_t if p["state"] != "end" and p["state"] != "obsolete"]
# TODO : Find out how to retrieve this attribute
filtered_products_t = products_t
# state replaced by active in product_template table
filtered_products_t = [p for p in products_t if p["active"]]
sales_average_params = {
'ids': ptids,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment