# -*- coding: utf-8 -*- from odoo import models, fields class SkeenPatientAdjunto(models.Model): _name = 'skeen.patient.adjunto' _description = 'Adjunto de Paciente (expediente escaneado o imagen)' _order = 'create_date desc' partner_id = fields.Many2one('res.partner', string='Paciente', required=True, ondelete='cascade', domain=[('is_patient', '=', True)]) kind = fields.Selection([ ('expediente', 'Expediente Escaneado'), ('imagen', 'Imagen'), ], string='Tipo', required=True) name = fields.Char(string='Archivo') file = fields.Binary(string='Contenido', attachment=True, required=True) mimetype = fields.Char(string='Tipo MIME') notes = fields.Char(string='Notas')