I making a module for student's to select their lunch in a day and it's a selection .
how i can see how many student's select food1 and how many select food2 ?
this is my food class :
class Lunch(models.Model):
_name = "food.foods"
name = fields.Char(string="نام غذا", required=True)
food_type = fields.Selection([('withrice','WithRice'),('whitoutrice' , 'WithoutRice')] , string="select" )
and this is my days class :
class DayOfWeek(models.Model):
_name = 'food.days'
_description = 'days of week'
name = fields.Char(string='day' , compute='_complite_name')
date = fields.Date(string='date', required=True)
week_id = fields.Many2one('food.weeks', string='week')
food_id = fields.Many2many('food.foods', string='food name')