<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data noupdate="1">
        <!-- Muestras de Laboratorio (Lotes) con el nuevo campo sample_type_product_id -->
        <record id="lab_sample_01" model="stock.lot">
            <field name="name">SAM-2025-00001</field>
            <field name="product_id" model="product.product" eval="obj().env.ref('lims_management.sample_type_serum_tube').product_variant_id.id"/>
            <field name="is_lab_sample" eval="True"/>
            <field name="patient_id" ref="lims_management.demo_patient_1"/>
            <field name="collector_id" ref="base.user_admin"/>
            <field name="collection_date" eval="(DateTime.now() - timedelta(days=2)).strftime('%Y-%m-%d %H:%M:%S')"/>
            <field name="sample_type_product_id" ref="lims_management.sample_type_serum_tube"/>
            <field name="container_type">serum_tube</field>
            <field name="state">received</field>
        </record>
        
        <record id="lab_sample_02" model="stock.lot">
            <field name="name">SAM-2025-00002</field>
            <field name="product_id" model="product.product" eval="obj().env.ref('lims_management.sample_type_edta_tube').product_variant_id.id"/>
            <field name="is_lab_sample" eval="True"/>
            <field name="patient_id" ref="lims_management.demo_patient_2"/>
            <field name="collector_id" ref="base.user_admin"/>
            <field name="collection_date" eval="(DateTime.now() - timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')"/>
            <field name="sample_type_product_id" ref="lims_management.sample_type_edta_tube"/>
            <field name="container_type">edta_tube</field>
            <field name="state">in_process</field>
        </record>
        
        <record id="lab_sample_03" model="stock.lot">
            <field name="name">SAM-2025-00003</field>
            <field name="product_id" model="product.product" eval="obj().env.ref('lims_management.sample_type_urine_container').product_variant_id.id"/>
            <field name="is_lab_sample" eval="True"/>
            <field name="patient_id" ref="lims_management.demo_patient_3"/>
            <field name="collector_id" ref="base.user_admin"/>
            <field name="collection_date" eval="(DateTime.now() - timedelta(hours=6)).strftime('%Y-%m-%d %H:%M:%S')"/>
            <field name="sample_type_product_id" ref="lims_management.sample_type_urine_container"/>
            <field name="container_type">urine</field>
            <field name="state">collected</field>
        </record>
        
        <record id="lab_sample_04" model="stock.lot">
            <field name="name">SAM-2025-00004</field>
            <field name="product_id" model="product.product" eval="obj().env.ref('lims_management.sample_type_citrate_tube').product_variant_id.id"/>
            <field name="is_lab_sample" eval="True"/>
            <field name="patient_id" ref="lims_management.demo_patient_1"/>
            <field name="collector_id" ref="base.user_admin"/>
            <field name="collection_date" eval="(DateTime.now() - timedelta(days=3)).strftime('%Y-%m-%d %H:%M:%S')"/>
            <field name="sample_type_product_id" ref="lims_management.sample_type_citrate_tube"/>
            <field name="state">analyzed</field>
        </record>
    </data>
</odoo>
