from odoo import models, fields, api
from datetime import datetime, timedelta

class SosTargetTracker(models.Model):
    _name = 'sos_target_tracker'
    _description = 'Inside Sales Executive Activities Log'

    weekly_entries_count = fields.Integer(string="Weekly Target Achieved", compute="_compute_week", store=True)
    weekly_status = fields.Text(string="Target Status",default="3 more to achieve this week's target.")
    inside_sales_executive = fields.Many2one(
        'res.users', 
        string='Sales Executive', 
        domain=lambda self: [('groups_id', 'in', self.env.ref('sos_inventory.sos_sales_user').ids)]
    )
    entry_date = fields.Date(string="Date", default=fields.Date.today)
    week = fields.Char(string="Week")

 