how can i get the som of coef for every classe
class gestion_classe(osv.osv):
_name = "gestion.classe"
_rec_name = "nomc"
_description = "Table des classes"
_columns = {
'nomc': fields.char('Nom de la classe',required=True),
'numg_ids': fields.one2many('gestion.groupe','classe_id','Groupes'),
'numm_ids': fields.one2many('gestion.matiere','classe1_id','Matieres'),
'somme_coef':
}
class gestion_matiere(osv.osv):
_name = "gestion.matiere"
_rec_name= "libelle"
_description = "Table des matieres"
_order = "numm asc"
_columns = {
'numm': fields.integer('Code matiére',required=True),
'libelle': fields.char('Libelle'),
'classe1_id': fields.many2one('gestion.classe','Classe',ondelete='cascade'),
'coef' : fields.integer('Coefficient matière'),
'prof_ids': fields.one2many('gestion.prof','matiere_id','Enseignants'),
'eleve_ids' :fields.one2many('gestion.note.matiere','asso1_id','Matiere'),
}