Commit 8ac58d10 by Yvon Kerdoncuff

product_template.state becomes product_template.active

parent 4b8c7505
...@@ -651,7 +651,7 @@ class CagetteProducts(models.Model): ...@@ -651,7 +651,7 @@ class CagetteProducts(models.Model):
# Get products templates # Get products templates
f = [ f = [
"id", "id",
"state", "active",
"name", "name",
"default_code", "default_code",
"qty_available", "qty_available",
...@@ -666,10 +666,8 @@ class CagetteProducts(models.Model): ...@@ -666,10 +666,8 @@ class CagetteProducts(models.Model):
c = [['id', 'in', ptids], ['purchase_ok', '=', True], ['active', '=', True]] c = [['id', 'in', ptids], ['purchase_ok', '=', True], ['active', '=', True]]
products_t = api.search_read('product.template', c, f) products_t = api.search_read('product.template', c, f)
# state is no more in product_template table # state replaced by active in product_template table
# filtered_products_t = [p for p in products_t if p["state"] != "end" and p["state"] != "obsolete"] filtered_products_t = [p for p in products_t if p["active"]]
# TODO : Find out how to retrieve this attribute
filtered_products_t = products_t
sales_average_params = { sales_average_params = {
'ids': ptids, '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