title: Compute sum Odoo
body: <p>I have made a custom module budget with the field Value. I would like to sum all the values for the budgets I've made today</p>
  
  <pre><code>    def value_budget_day(self):
      for budget in self:
          # Encontrar si hoy es el mismo dia que se creo un presupuesto
          c_date = datetime.strftime(budget.create_date, "%Y-%m-%d %H:%M:%S")
          t_date = datetime.strftime(budget.today, "%Y-%m-%d %H:%M:%S")
          create_day = c_date[:10]
          today_day = t_date[:10]
  
          if create_day == today_day:
              # Sumar todos los valores de los presupuestos de ese día
             total = 0.0
             for val in budget:
                 total += val.value
             budget.today_value = total
  
          else:
              budget.today_value = 35
  </code></pre>
  
  <p>In my code the values are not sum</p>
  
  <p><a href="https://i.stack.imgur.com/TKMyw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TKMyw.jpg" alt="enter image description here"></a></p>