30 lines
781 B
Python
30 lines
781 B
Python
# -*- coding: utf-8 -*-
|
|
from odoo import models, fields
|
|
|
|
class StockLot(models.Model):
|
|
_inherit = 'stock.lot'
|
|
|
|
is_lab_sample = fields.Boolean(string='Is a Laboratory Sample')
|
|
|
|
patient_id = fields.Many2one(
|
|
'res.partner',
|
|
string='Patient',
|
|
domain="[('is_patient', '=', True)]"
|
|
)
|
|
|
|
request_id = fields.Many2one(
|
|
'sale.order',
|
|
string='Lab Request',
|
|
domain="[('is_lab_request', '=', True)]"
|
|
)
|
|
|
|
collection_date = fields.Datetime(string='Collection Date')
|
|
|
|
container_type = fields.Selection([
|
|
('serum_tube', 'Serum Tube'),
|
|
('edta_tube', 'EDTA Tube'),
|
|
('swab', 'Swab'),
|
|
('urine', 'Urine Container'),
|
|
('other', 'Other')
|
|
], string='Container Type')
|