from odoo import http
from odoo.http import request
from datetime import date

class DashboardController(http.Controller):

    @http.route('/dashboard', type='http', auth='user', website=True)
    def dashboard(self, **kwargs):
        today = date.today()
        pending_orders = request.env['sos_mon'].sudo().search_count([
            ('status', '=', 'open')
        ])

        values = {
            'status': status,
        }
        return request.render('sos_dashboard.dashboard_template', values)
