feat(#7): Extender stock.lot para gestion de muestras

This commit is contained in:
Luis Ernesto Portillo Zaldivar 2025-07-14 08:12:43 -06:00
parent 291ceb9bfd
commit ade39f9310
4 changed files with 33 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from . import partner
from . import product
from . import analysis_range
from . import sale_order
from . import product
from . import partner
from . import sale_order
from . import stock_lot

View File

@ -0,0 +1,29 @@
# -*- 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')