Commit 9b3c216e by François C.

Make sure Odoo params to be used as integers

parent 193bcf2d
...@@ -116,7 +116,7 @@ class LaCagetteProducts(models.Model): ...@@ -116,7 +116,7 @@ class LaCagetteProducts(models.Model):
""" """
conf = self.env['ir.config_parameter'] conf = self.env['ir.config_parameter']
minimum_significative_consecutive_days =\ minimum_significative_consecutive_days =\
conf.get_param('lacagette_products.nb_of_consecutive_non_sale_days_considered_as_break') int(conf.get_param('lacagette_products.nb_of_consecutive_non_sale_days_considered_as_break'))
consecutive_found = [] # each serie is added to compute total of them consecutive_found = [] # each serie is added to compute total of them
missing_days = [] missing_days = []
for d in days: for d in days:
...@@ -208,7 +208,7 @@ class LaCagetteProducts(models.Model): ...@@ -208,7 +208,7 @@ class LaCagetteProducts(models.Model):
if 'from' in params: if 'from' in params:
dfrom = params['from'] dfrom = params['from']
else: else:
dfrom = today - datetime.timedelta(delta_day) dfrom = today - datetime.timedelta(int(delta_day))
dfrom = dfrom.strftime("%Y-%m-%d") dfrom = dfrom.strftime("%Y-%m-%d")
try: try:
sql = """ sql = """
......
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