\"feat(partner): Add patient and doctor fields to res.partner\"

This commit is contained in:
Luis Ernesto Portillo Zaldivar 2025-07-13 17:49:30 -06:00
parent 07d381d453
commit 40deb136d5
2 changed files with 17 additions and 0 deletions

View File

@ -1 +1,2 @@
# -*- coding: utf-8 -*-
from . import partner

View File

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
from odoo import models, fields, api
class ResPartner(models.Model):
_inherit = 'res.partner'
is_patient = fields.Boolean(string="Es Paciente")
patient_identifier = fields.Char(string="Identificador de Paciente", copy=False)
is_doctor = fields.Boolean(string="Es Médico")
doctor_license = fields.Char(string="Licencia Médica", copy=False)
_sql_constraints = [
('patient_identifier_unique', 'unique(patient_identifier)', 'El identificador del paciente debe ser único.'),
('doctor_license_unique', 'unique(doctor_license)', 'La licencia médica debe ser única.')
]