\"feat(partner): Add patient and doctor fields to res.partner\"
This commit is contained in:
parent
07d381d453
commit
40deb136d5
|
@ -1 +1,2 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from . import partner
|
16
lims_management/models/partner.py
Normal file
16
lims_management/models/partner.py
Normal 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.')
|
||||
]
|
Loading…
Reference in New Issue
Block a user