- Fixed missing action_collect method for pending_collection state
- Updated all model field labels to Spanish
- Updated view labels and strings to Spanish
- Fixed readonly conditions for pending_collection state
- Added barcode and new fields to stock.lot views
- Updated sale.order embedded view with correct button
- Added 5-minute timeout note to CLAUDE.md
- Removed problematic demo sale.order XML records
- Updated test script location guidance in CLAUDE.md
- Marked all acceptance criteria as completed in plan
- Created 4 demo lab orders showcasing different scenarios:
- Order 1: Multiple analyses requiring same sample type (EDTA)
- Order 2: Multiple analyses with different sample types
- Order 3: Mixed analyses for thyroid panel
- Order 4: Pediatric order with different sample types
- Added file to manifest demo section
- Successful test with ephemeral instance restart (main initialization OK)
- Comprehensive verification script for automatic sample generation
- Tests existing orders with generated samples
- Creates and tests new order with sample generation
- Verifies barcode uniqueness across all samples
- Checks for analyses without sample types
- Provides detailed summary and issue reporting
- Successful test with ephemeral instance restart
- Added 'Muestras Generadas' tab in sale.order form view
- Shows generated samples with barcode, type, volume, and analyses
- Added action buttons for sample workflow in the embedded list
- Added indicators in sale.order list view for lab requests and samples
- Successful test with ephemeral instance restart
- Added barcode field to stock.lot with automatic generation
- Implemented unique barcode generation in format YYMMDDNNNNNNC
- Added Luhn check digit for barcode validation
- Handles high volume scenarios with sample type prefixes
- Collision detection and retry mechanism for uniqueness
- Successful test with ephemeral instance restart
- Added generated_sample_ids field to sale.order model
- Override action_confirm() to intercept lab order confirmation
- Implemented _generate_lab_samples() main logic method
- Implemented _group_analyses_by_sample_type() for grouping
- Implemented _create_sample_for_group() for sample creation
- Added necessary fields to stock.lot model (doctor_id, origin, volume_ml, analysis_names)
- Updated state field to include 'pending_collection' state
- Added proper error handling and user notifications via message_post
- Successful test with ephemeral instance restart