# -*- coding: utf-8 -*-

from odoo import models, fields, api

class cours(models.Model):
    _name = 'iut.course'
    _sql_constraints = {
        ('name_unique', 'unique(name)', 'Ce nom existe déjà')
    }

    name = fields.Char(string="Nom du cours",required=True)
    
    schedule_ids = fields.One2many('iut.schedule', 'course_id')
    
84afed602a47ca6b12d9bb579c784d172202f132
<mask token>

<mask token>


class cours(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class cours(models.Model):
    _name = 'iut.course'
    _sql_constraints = {('name_unique', 'unique(name)', 'Ce nom existe déjà')}
    name = fields.Char(string='Nom du cours', required=True)
    schedule_ids = fields.One2many('iut.schedule', 'course_id')

from odoo import models, fields, api


class cours(models.Model):
    _name = 'iut.course'
    _sql_constraints = {('name_unique', 'unique(name)', 'Ce nom existe déjà')}
    name = fields.Char(string='Nom du cours', required=True)
    schedule_ids = fields.One2many('iut.schedule', 'course_id')

# -*- coding: utf-8 -*-

from odoo import models, fields, api

class cours(models.Model):
    _name = 'iut.course'
    _sql_constraints = {
        ('name_unique', 'unique(name)', 'Ce nom existe déjà')
    }

    name = fields.Char(string="Nom du cours",required=True)
    
    schedule_ids = fields.One2many('iut.schedule', 'course_id')
    