Commit 4944a0a6 by François C.

Merge branch 'fix_use_of_odoo_param_in_consumption_computation' into 'dev_cooperatic'

Make sure Odoo params to be used as integers

See merge request !14
parents 384ec249 9b3c216e
......@@ -116,7 +116,7 @@ class LaCagetteProducts(models.Model):
"""
conf = self.env['ir.config_parameter']
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
missing_days = []
for d in days:
......@@ -208,7 +208,7 @@ class LaCagetteProducts(models.Model):
if 'from' in params:
dfrom = params['from']
else:
dfrom = today - datetime.timedelta(delta_day)
dfrom = today - datetime.timedelta(int(delta_day))
dfrom = dfrom.strftime("%Y-%m-%d")
try:
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