Skip to content
Extraits de code Groupes Projets
Sélectionner une révision Git
  • 66b87a95200ff6348b9a4e6356e8b7d326754b19
  • 14.0 par défaut
  • 12.0 protégée
  • 13.0
4 résultats

pre-migration.py

Blame
  • scop_legal_event.py 828 o
    # © 2019 Le Filament (<http://www.le-filament.com>)
    # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
    
    from odoo import models, fields
    
    
    class ScopLegalEvent(models.Model):
        _name = "scop.legal.event"
        _description = "Legal event"
    
        partner_id = fields.Many2one(
            comodel_name='res.partner',
            string='Organisme',
            domain=[('is_company', '=', True)],
            ondelete='restrict', index=True)
        date = fields.Date("Date de l’évènement", index=True)
        type_id = fields.Many2one(
            'scop.legal.event.type',
            string="Type d'évènement",
            ondelete='restrict', index=True)
        note = fields.Text("Commentaire")
    
    
    class EventType(models.Model):
        _name = "scop.legal.event.type"
        _description = "Legal Event type"
    
        name = fields.Char('Event type')