Backend Python Engineer · Lima, Perú · Open to Remote

Luis
Gonzalez

~170× Invoice throughput
50k Recordings recovered
45d CSV gap restored
100% Test coverage
Python Django · DRF FastAPI Celery · Redis PostgreSQL Docker Fabric · Paramiko GitHub Actions 2+ yrs production

Luis
Gonzalez

Backend Python Engineer

Lima, Perú · subliandev@gmail.com

2+
Yrs production
170×
Perf. gain
100%
Test coverage
60+
Tests written
Open Source

Active contributor to python-docs-es — the official Spanish translation of Python documentation, maintained by the Python Software Foundation.

I'm a Backend Python Engineer with 2+ years of professional experience across healthcare and enterprise systems — currently at Fiberlux, where I work on Odoo development and lead a full ERP migration from Odoo v13 to a Django-based microservices architecture.

My focus is on building scalable, maintainable architectures. I enjoy tackling performance bottlenecks head-on — profiling with cProfile, tuning queries with EXPLAIN ANALYZE, and applying design patterns (Singleton, Strategy, OCP) to turn monolithic code into modular, extensible systems.

At Clínica Santa Isabel, I built core healthcare systems including a Payroll module and an Electronic Health Records system using Django and FastAPI. I care deeply about test coverage, observability, and CI/CD practices that keep systems reliable in production.

When production systems fail silently — corrupt data, missing files, broken sync — I debug from first principles: reading packet captures, auditing XML configurations, writing targeted SQL, and building the tooling needed to recover. That mindset led to recovering 50,000 call recordings and 45 days of telephony data after an infrastructure incident that went undetected for weeks.

Currently deepening expertise in microservices architecture and AWS fundamentals. Languages: Spanish (Native) · English B2 (EFSet Certified)  ·  Open to: Remote backend roles, Python infrastructure collaboration, mentorship.

Experience

Apr 2, 2025 – Present · Fiberlux · Full-time · Lima, Perú

Backend Developer & Systems Analyst

Backend Engineering · Odoo · Django · Performance & Architecture

  • Built a Django-based Electronic Invoicing Engine replacing Odoo's billing core — delivering ~170× throughput improvement (50 invoices in 35s with QR codes) using 10 async workers, Nubefact/SUNAT API, and automatic email dispatch.
  • Re-engineered Five9 SFTP sync module from synchronous to multi-threaded async design, eliminating company-wide ERP freezes during data loads; achieved 30% storage reduction via configurable batch sanitization. Recovered 50,000 call recordings and 45 days of telephony data following an undetected infrastructure incident.
  • Designed Multi-Executive Governance (EV) engine extending Odoo's ir.rule security framework — eliminated 100% of cross-team AccessError blocks, reducing access resolution from 2–4 hours to 0ms.
  • Leading phased Odoo v13 → Django migration: bridged first 5 modules via flat-table intermediate layer, extracted 3 critical services to standalone Django microservices with 100% test coverage standard.
  • Mentored 3 programming interns on backend architecture, design patterns, and testing practices; established SOLID principles and unit testing policy as team standards.
~170× Invoice Throughput SUNAT API · e-Invoicing 50k Recording Recovery Web Scraping · Requests · BS4 Odoo v13→Django Python Threading SFTP · Fabric · Paramiko PostgreSQL · B-Tree Index 30% Storage Saved Design Patterns
Dec 2023 – Mar 2025 · 1 yr 4 mos · Clínica Santa Isabel S.A.C. · On-site · Lima, Perú

Backend Developer & Systems Analyst

Full-time · ERP & Healthcare Systems · Django · FastAPI · Docker

ISIS_CSI — Payroll & HR System Reengineering

  • Refactored calculation engines for Gratificaciones, CTS, Vacaciones and Liquidaciones — ensuring full compliance with Peruvian labor regulations.
  • Designed annual profit-sharing (utilidades) calculation process integrating Pandas for high-volume salary data — reducing processing time and eliminating manual errors.
  • Refactored biometric time-tracking and shift management system for clinical staff, handling rotating shifts and on-call schedules. Automated SUSALUD / SETIIPRES regulatory compliance reporting.

Hospital Management Web Ecosystem

  • Led creation of electronic clinical documents for Hospitalización, Emergencias, Quirófano, and Neonatología — fully replacing paper-based workflows with dynamic digital forms handling ~1,000 new records/day.
  • Built backend services in FastAPI within a microservices architecture using Docker, ensuring high-speed response for critical clinical operations.
Python · Django FastAPI · Microservices Docker PostgreSQL · Indexing Pandas Payroll · Labor Law SUSALUD / SETIIPRES EHR · ~1k records/day
Previous · Lima, Perú

Mi Beatriz S.A.C.

Help Desk & Logistics Operations

  • Real-time satellite tracking of cargo transport units; daily reports and operational support coordination.
Venezuela

ETC Vicente Sucre y Urbaneja

Computer Science Teacher

  • Taught programming languages, databases, systems development, and software security.

Education

Universidad de Oriente

2004 – 2014 · Venezuela

B.Sc. in Computer Science

Algorithms, data structures, software engineering, databases, computer networks, and mathematical modeling. Strong foundation for system design and performance analysis.

EFSet English Certificate

Certified

English B2 — Upper Intermediate

Comfortable in English-speaking teams, reading technical docs, participating in code reviews, and written/verbal communication in international environments.

Projects

🎙️

Five9 Recording Recovery Suite

Web Scraping · SFTP Pipeline · Atomic Checkpoint

3-script toolkit that recovered 50,000 call recordings and 45 days of telephony data after an infrastructure incident. Scraper reuses browser session cookie; pipeline corrects file mtime from metadata; audit script verifies presence without downloading.

Python · RequestsBeautifulSoup4 Fabric · ParamikoSFTP Atomic CheckpointETL Pipeline
🧵

Background Task Processor

Django · Celery · Redis

Async file processing (CSV/Excel) with Celery and Redis. Decouples requests from heavy jobs, with status dashboard for upload history and task tracking. Production-style retry patterns.

DjangoCelery RedisPandas
🏥

Hospital Records System

FastAPI · ~1k records/day · Docker

Medical data management backend handling ~1,000 new records/day across Hospitalización, Emergencias, Quirófano, and Neonatología. Secure JWT access control, structured data workflows, full digital replacement of paper forms.

FastAPIDocker PostgreSQLJWT Microservices
📧

Daily English Phrases Mailer

Flask · Full-Stack · Live in Production

Automated daily email delivery with multi-role accounts (free/premium), email confirmation, admin dashboard, retries, and cron scheduling. Deployed to production.

FlaskMySQL SMTPBootstrap
🧪

Pytest Learning Lab

Advanced Testing · Living Knowledge Base

Deep-dive into professional testing: reusable fixtures, parametrized tests, mocking of HTTP/email services. Modern uv-based environment.

PytestMocking Fixturesuv

Case Studies

🧭

Nexus OMS — Multi-Tenant Order Management Platform (SaaS in Progress)

Django 6 · Clean Architecture · DDD · HTMX · Celery · Multi-Tenancy · Personal Project · 2025–Present
View Case Study

What It Is

Nexus is a personal SaaS project — an Order Management System built weekend by weekend with a deliberate architectural thesis: that a Django project can scale without becoming a monolith trap. It targets Latin American SMBs that need electronic invoicing (SUNAT), multi-warehouse inventory, and customer traceability in one platform.

The goal is eventually a multi-tenant SaaS where each business (tenant) operates in full data isolation — its own orders, products, clients, and financial reports — on a shared infrastructure. A CRM layer for customer follow-up and sales opportunity tracking is planned for future versions.

Current status: core OMS fully functional, invoicing pipeline wired, 220+ tests passing. Not production-deployed yet — this is active development, not a finished product.

The Architectural Thesis

Most Django projects accumulate logic in models and views until they can't be tested without a running database. Nexus is built against that tendency from the start: Clean Architecture with a hard src/domain/, src/application/, src/infrastructure/, src/interfaces/ boundary structure.

Domain services hold business logic. Models are persistence schemas. Views are thin adapters. The payoff: the 220+ test suite runs deterministically without HTTP calls, mocking only at the infrastructure boundary.

Some parts of the domain are still coupled to Django ORM — an honest tradeoff accepted during active development. The architecture exists as a constraint that makes the coupling visible and removable, not as a description of a finished state.

Systems Built

SystemWhat it doesTechnical highlight
Multi-Tenancy Full org-level data isolation: each tenant sees only its own orders, products, clients, and KPIs OrganizationMiddleware resolves tenant from header (X-Org-ID) or URL slug, stores in thread-local. Custom ORM managers inject WHERE tenant_id = X on every query automatically.
OMS Order Lifecycle Full state machine: DRAFT → PENDING → PAID → SHIPPED → DELIVERED → RETURNED FSM enforces valid transitions. select_for_update() prevents race conditions on stock. Stock double-decrement bug caught and fixed: single source of truth via Django signal.
Financial Engine Net margin reports with real COGS, commissions, and refund accounting FinanceService: COGS calculated from last received PurchaseOrderItem per product. Fallback heuristic (50% margin) when no purchase history. Decoupled from order flow, reusable.
Electronic Invoicing Pipeline SUNAT-ready invoice state machine with async sync, retry queue, and dead letter handling Provider abstraction via Adapter pattern — MockNubefactClient in dev, real client in prod. Swap provider without touching domain logic. Use case: CreateInvoiceUseCase / QueryInvoiceStatusUseCase.
Async Task Pipeline Background PDF generation, notification dispatch, finance reporting Celery + Redis. Mocker Pattern for test isolation: async tasks are synchronous in unit tests — no broker required to run the suite.
Notification System Multi-channel: Email, Telegram, WhatsApp — switchable per context Strategy Pattern: EmailNotification, TelegramNotification, WhatsAppNotification implement the same interface. Channel selection at call time, no conditionals in business logic.
Operational Dashboard KPIs per tenant: invoicing rates, queue depth, retry count, provider latency, reconciliation status DashboardKPIService aggregates all metrics. HTMX partial updates for reactive refresh without SPA overhead. DailyInvoiceSeriesService feeds Chart.js visualizations.

Deliberate Architecture Decisions

DecisionAlternatives rejectedReasoning
Modular monolith over microservices Separate services from day 1 Clean layer boundaries make extraction tractable later. Premature splitting adds operational cost before product-market fit.
Shared DB + tenant discriminator over DB-per-tenant Separate schema or DB per tenant Operationally simpler at early scale. ORM managers enforce isolation at query level. Easier to migrate to DB-per-tenant if needed.
HTMX + Django templates over React/SPA Full SPA frontend Operator-facing dashboard doesn't need client-side routing. Server-side rendering with HTMX partials gives reactive UX at fraction of the complexity. Alpine.js covers remaining interactivity.
Django 6 + Python 3.12 Stable LTS versions Personal project: deliberate choice to stay on the leading edge, learn new async capabilities, and avoid accumulating upgrade debt.

Status & Roadmap

220+Automated tests
5Milestones complete
2Interfaces (API + Web)
CI/CDGitHub Actions + Codecov
SUNATInvoice pipeline wired
→ SaaSTarget deployment
Python 3.12 · Django 6 Django REST Framework HTMX · TailwindCSS · Alpine.js Celery · Redis PostgreSQL · JSONB Docker · GitHub Actions Clean Architecture · DDD Multi-Tenancy FSM · Strategy · Adapter Nubefact · SUNAT

View Repository →

📊

Payroll ETL Pipeline — Automating Profit-Sharing for 300 Healthcare Workers

Python · Pandas · PostgreSQL · Stored Procedures · PDF Generation · Clínica Santa Isabel
View Case Study

The Problem

Clínica Santa Isabel's internal payroll system (IsisPlan) handled standard payroll processes but had no module for employee profit-sharing (utilidades). The calculation was done entirely by hand in Excel — manually cross-referencing payroll and liquidation data for ~300 active workers, applying Peruvian labor law rules (D.Leg. 892), and adjusting for fifth-category income tax withholdings.

The process was error-prone and non-reproducible. Workers across the clinic had heterogeneous compensation structures — fixed-salary administrative staff and hourly-rate clinical staff (physicians, nurses, technicians) — each with different calculation bases under law. The hardest edge case: workers who had ceased employment and re-entered within the same fiscal year, requiring pro-rated calculations across two separate employment periods.

The project ran for 3 months from local development to production deployment, replacing the Excel process entirely.

Technical Approach

The pipeline extracted data directly from IsisPlan's PostgreSQL database — using stored procedures to pre-aggregate payroll and liquidation records at the database level before ingestion. This kept complex join and filtering logic in SQL where it performs better, and reserved Python/Pandas for business rule application and edge case handling.

Once loaded into DataFrames, the transformation layer applied profit-sharing rules per worker category, detected cese/reingreso cases via duplicate worker IDs with non-contiguous date ranges, and processed each employment segment independently before aggregating the final entitlement.

A superuser interface allowed the payroll administrator (planillero) to review intermediate values and adjust criteria before committing — specifically for fifth-category tax withholding adjustments that required human judgment. The final results were persisted back to PostgreSQL and surfaced through three outputs: an individual record viewer/modal per worker, a per-worker PDF payment slip, and a master Excel file with all records and calculation variables for audit.

Key Technical Challenges

ChallengeComplexitySolution
Cese y reingreso Worker ceases mid-year and re-enters — two employment periods in the same fiscal year, different accrued days and base salary per segment DataFrame logic detects duplicate worker IDs with non-contiguous date ranges. Each segment processed independently, then aggregated with pro-rating capped per D.Leg. 892 limits.
Heterogeneous compensation Fixed-salary (admin) vs. hourly-rate (clinical) — different calculation base for profit-sharing under Peruvian law Compensation type flag set at extraction layer via stored procedure. Separate Pandas calculation branches per category, merged in final DataFrame before output.
Multi-source merge Nómina and liquidación tables had different schemas, time granularities, and worker ID formats Normalization step before merge: ID canonicalization, period alignment, null handling. Stored procedures pre-filtered irrelevant records to reduce Python-side complexity.
Fifth-category tax withholding Retention amounts require human judgment — no fully automatable rule for all cases Pipeline flags affected records for superuser review. Planillero adjusts values before final commit. System enforces that flagged records must be reviewed before output generation.

Impact

~300Workers processed
<3 minFull run (was: days)
~99%Error reduction
3Output formats (modal · PDF · Excel)
0Manual Excel cross-referencing
3 moDev → Production
Python · Pandas PostgreSQL · Stored Procedures ETL Pipeline PDF Generation Excel Export Data Transformation D.Leg. 892 · Peruvian Labor Law Edge Case Handling IsisPlan Integration
🔄

SSR Re-engineering — Network Automation for ISP Operations

Odoo v13 · Python · REST APIs · TL1 Commands · Fiberlux · 2026
View Case Study

The Problem

Fiberlux operates an ISP with hundreds of active contracts. Any change to a customer's service status — suspension for non-payment, reactivation after payment, cancellation — required the NOC team to manually interact with the OLT (ZENIT ONE) through a web interface.

The existing Odoo module triggered a web scraping robot that simulated browser clicks on the ZENIT ONE interface. Each service change took ~30 seconds, with no actual confirmation that the change was applied in the network. On billing peak days (days 9–10 of each month), processing 94–135 contracts meant ~47 minutes of HTTP worker blockage — causing Odoo timeouts company-wide.

Additional failure modes: the robot had no result verification, silently failed on network changes, and made duplicate calls to a legacy v1 endpoint while the new v2 was active — causing race conditions that corrupted action records.

Architectural Solution

  • Direct TL1 API integration via an intermediary service (APIOdoo) — replaced browser scraping with authenticated TL1 commands (CHG-ONU-STAT-PON, LST-ONU-DETAIL) executing in ~7s per service.
  • Async dispatch queue — when GPON service count exceeds a configurable threshold (default: 10), set_done() returns in <1s, enqueuing action lines with is_pending_dispatch=True. A dedicated cron dispatches batches of 8 every 2 minutes.
  • Polling confirmation cron — separate 5-minute cron calls PollZenitStatus, reading real ADMINSTAT from the OLT port before marking any action as complete. The SSR only closes when all lines are confirmed in the network.
  • Multi-equipment discriminator — when ZENIT ONE returns multiple ONU records for the same service ID (migrated or relocated equipment), the system disambiguates by onu_id (last OID segment) — preventing accidental modification of a different customer's port.
  • Four-flow state machine — suspension, reactivation, cancellation, and administrative cancellation each have their own valid line state transitions, blocking inappropriate operations silently and correctly.
  • Email notification pipeline — async mode sends two emails: one when the dispatch queue empties (services sent to network), one when the SSR closes completely (all confirmed). Applied to both sync and async flows.

Silent Bugs Found & Fixed

BugSymptomRoot cause & fix
Duplicate execute_action_manual body Reactivated services landed in pending instead of done when Fibra Directa NOC confirmed Second method body shadowed the first in Python; the shadowed copy used stop_date to determine state, reverting an agreed business rule. Removed duplicate; single implementation with savepoints retained.
tipo_map mapping cancel → suspend NOC Panel showed "Suspension" type for cancellation actions; state_new_request wrote suspend instead of cancel Field type in request.action.subscription.line is a fixed Selection (only suspend/activation valid). Separated into two maps: tipo_map for the DB field, state_new_map for the display value.
state_api_ids blocking cancellations All cancellation SSRs silently found zero processable lines — "sin líneas procesables" with no error state_api_ids only covers ZENIT ONE states (suspend/done). Cancellations always route to NOC manual — skip that filter for cancel/cancel-adm types.
Race condition on DID/OID write ERROR: no se pudo serializar el acceso — APIOdoo writing back via XML-RPC while Odoo held the row lock APIOdoo returns DID/OID in the HTTP response body. Odoo writes locally in its own transaction. No cross-process writes.
v1 legacy duplicate calls Each action line triggered both the v2 API and the old v1 robot endpoint simultaneously Override of resent_json_action_robot() with three exit conditions: manual NOC line, action_in_progress=True, or json already contains DID/OID from v2.

Before vs. After

DimensionLegacy (Robot Scraper)Re-engineered (TL1 APIs)
Execution methodBrowser click simulation via web scrapingDirect TL1 API commands (CHG-ONU-STAT-PON)
Speed per service~30 seconds~7 seconds (~4× faster per service)
Peak day (135 contracts)~67 min — HTTP worker timeout<1s operator wait; async dispatch in background
Network confirmationAssumed — no real verificationADMINSTAT read from OLT port (LST-ONU-DETAIL)
Multi-equipment contractsNo discrimination — risk of touching wrong portDisambiguated by onu_id (OID last segment)
SSR close conditionClosed on first successful actionCloses only when all action lines confirmed
Cancellation flowNot functional — silently returned 0 lines4 flows validated: suspend, reactivate, cancel, cancel-adm
Operator notificationToast on screen only (missed if browser closed)Email at dispatch complete + email at SSR close

Impact

~4×Faster per service
<1sOperator wait (async)
4Flows validated in prod
5Silent bugs eliminated
0False confirmations
100%Network-verified closes
Python · Odoo v13 TL1 Network APIs REST · Requests Async Cron Queue PostgreSQL · State Machine JWT Session Management XML XPath Inheritance Email Pipeline
🎙️

Data Recovery at Scale — 50k Recordings & 45-Day CSV Gap

Python · Web Scraping · SFTP · ETL · Fiberlux · 2026
View Case Study

The Incident

In December 2025, the call center telephony sync system began generating incomplete data. By January 2026 it had stopped entirely. No alert had fired. No error appeared in the logs. The failure was silent by nature — a public IP change by the infrastructure team, unnotified, had severed the connection to the data source.

Investigation required coordinating with the telephony provider and the NOC team to trace a change that had happened weeks earlier. Once found, the scope became clear: ~50,000 audio recordings and 45 days of CSV reports needed to be recovered from scratch.

The Constraints

The provider's portal had the data — but no bulk download API. Each recording was accessible only via individual button click. The CSV reports were available as master files covering multiple months, requiring segmentation into daily files matching the exact naming format the Odoo sync module expected.

Additional complication: downloaded audio files carried the download date as mtime, not the original call date — and the Odoo sync module used st_mtime to organize files. Uploading them directly would place all 50,000 recordings on a single incorrect date.

Three-Script Recovery Architecture

ScriptPurposeKey technique
five9_downloader.py Automated ~50,000 downloads over 3 days using browser session cookie injection Atomic checkpoint via os.replace() — crash-safe progress, no restart from zero
pipeline_fabric_five9.py 4-phase ETL: upload to temp → correct mtime → deploy to production → archive locally sftp.utime() sets correct call date from downloader's progress.json before deployment
fabric_wav_audit.py Verified presence of specific recordings across all SFTP paths without downloading sftp.stat() — existence check with zero data transfer; covers filename variants
segmentador_five9.py Segmented master CSV files into 306 daily files with date range filter and TAC row removal 2,875 corrupt TAC rows auto-discarded; YYYY_MM-DD naming format enforced for Odoo compatibility

Root Causes Found & Resolved

Root causeEvidenceFix
IP change — unnotified Complete data silence from Jan 2026 Reconnected with new IP; added monitoring
CSV naming format bug Odoo regex expected YYYY_MM-DD; script generated YYYYMMDD Fixed in normalizar_fecha(); returns tuple (fecha_id, date)
TAC rows with embedded \n 2,875 corrupt rows broke csv.DictReader in Odoo _sanitize_csv_content() patch in Odoo module + pre-filter in segmentador
15 alias records only in DB Created manually in Oct 2024, never in XML — reinstall would silently break everything Formalized in file_type_values_csv_data.xml with external IDs
Audio mtime mismatch Downloaded files showed download date, not call date Pipeline reads progress.json and sets correct mtime via sftp.utime() before deploy

Impact

50kRecordings recovered
45dData gap restored
306CSV files generated
2,875Corrupt rows removed
0Manual downloads
Python · Requests · BeautifulSoup4 Fabric · Paramiko · SFTP Cookie Session Injection Atomic Checkpoint (os.replace) sftp.utime() mtime correction CSV Segmentation · TAC Filtering Odoo XML Data Layer SQL Master Script
📡

High-Availability Sync Architecture

Odoo 13 · Five9 SFTP · Python Threading · Fiberlux · 2026
View Case Study

The Problem

Fiberlux's custom Odoo module synced telephony data (call recordings, transcripts, quality reports) from Five9's SFTP server into the ERP. The original implementation was fully synchronous — during large data loads, it blocked Odoo's worker processes company-wide, freezing CRM and invoicing operations simultaneously.

Additional issues: data inconsistencies between Five9 and Odoo, growing storage costs from unmanaged file accumulation (~1M files since 2023), and fragile SFTP connectivity with no retry logic.

Architectural Solution

  • Decoupled Threading: Migrated SFTP business logic to independent Python threads — achieving zero perceived latency for end users during mass synchronizations.
  • Concurrency Control: Indexed boolean flags in PostgreSQL manage thread state and prevent race conditions across concurrent sync workers.
  • SQL Optimization: B-Tree indexes on Many2one foreign keys + PostgreSQL views reduced query cost on 40k+ record tables for high-performance reporting.
  • Batch Sanitization: Configurable days_to_sanitize with batch processing — auto-purges stale files on schedule, achieving 30% storage reduction.
  • Resilient SFTP Client: Re-engineered using Fabric (replacing Paramiko) with hierarchical exception handling and automatic connection retry — handles network instability without operator intervention.
  • Memory-Efficient Batch Governor: Configurable batch-size controller terminates remote scanning immediately upon reaching limit, preventing OOM during massive historical migrations.

Before vs. After

DimensionLegacy (Sync)Async Architecture
ERP ImpactCompany-wide Odoo freeze during syncZero perceived latency — fully decoupled
Data ConsistencyInconsistencies between Five9 and Odoo100% record-level consistency guaranteed
StorageUnbounded accumulation (~1M files)30% reduction via auto-batch sanitization
Query PerformanceSlow scans on 40k+ record tablesB-Tree indexed, view-optimized queries
SFTP ResilienceHard failures on network issuesAuto-retry with hierarchical error handling
RAM StabilityRisk of OOM on 100k+ filesFlat memory footprint via batch-limit governor
Race ConditionsPossible data corruption under loadEliminated via indexed thread-state flags

Impact

0msERP latency during sync
30%Storage reduction
100%Data consistency
40k+Records optimized
Python · Odoo v13 SFTP · Fabric Python Threading PostgreSQL · B-Tree Index Concurrency Control Linux · Server Management
🔐

Multi-Executive Governance & Security

Odoo · Security Framework · Fiberlux · 2025–2026
View Case Study

The Problem

Odoo's standard security model restricts CRM and Sales document ownership to a single Salesperson field. At Fiberlux, multiple executives — Postventa, Fidelización, and others — needed to operate on the same customer account simultaneously.

The result: critical AccessError blocks on every cross-team operation, invoicing bottlenecks, and manual admin intervention required every 2–4 hours.

Architectural Solution

  • Dynamic Security Bypass: Re-architected base rules using dot-notation relational paths, enabling safe CRUD for secondary executives without forking Odoo core.
  • Context-Aware Approval Dispatch: Dispatcher inside create_level_ids inspects the operating uid and routes approvals to the correct team hierarchy.
  • ORM Integrity Fix: Resolved unlink AccessError by bridging: order_id.partner_id.linked_executive_ids.user_id — forcing an implicit JOIN at query time.
  • Auto-follower Integration: EVs wired into Odoo's messaging engine as automatic Followers — full lifecycle visibility without manual subscriptions.

Before vs. After

DimensionLegacy (Standard Odoo)EV Model (Implemented)
OwnershipSingle salespersonOwner + N linked executives
Access ControlHard block via ir.ruleDynamic access via relational domain
Approval RoutingAlways to account owner's teamBranched by creator's actual role
Access Resolution2–4 hours (manual by admin)0 ms (fully automated)
Audit TrailSalesperson onlyOwner + executor logged independently

Impact

100%Access errors eliminated
0 msAccess resolution time
N rolesMulti-exec scalability
ISO/TICFull audit compliance
Python · Odoo Framework ir.rule · Record Rules PostgreSQL Domain Force XML Inheritance Strategy Pattern ORM Internals
🧾

Electronic Invoicing Engine — ~170× Throughput

Django · SUNAT / Nubefact API · Fiberlux · 2026
View Case Study

The Problem

Fiberlux's invoicing workflow ran entirely inside Odoo — generating a single electronic invoice took ~2 minutes, with no async support. During billing peaks, the process saturated Odoo workers and blocked the entire ERP.

Solution

  • 10 parallel async workers — 50 invoices with QR codes in ~35 seconds.
  • Async/Sync dual mode — automatic synchronous fallback on API instability.
  • Full validation engine — detracciones, exportaciones, IGV, USD/PEN per SUNAT normativa.
  • Exponential backoff retry — every state transition recorded atomically for compliance.
  • 100% test coverage before production deployment.

Before vs. After

DimensionLegacy (Odoo)Django Engine
Throughput1 invoice / ~2 min50 invoices / 35s (~170× faster)
ConcurrencySingle synchronous thread10 parallel async workers
ERP ImpactSaturated Odoo workers during peaksFully decoupled — zero ERP contention
Test CoverageNone100% (unit + integration)

Impact

~170×Throughput gain
35s50 invoices w/ QR
100%Test coverage
0Manual retries
Python · Django REST Framework Nubefact / SUNAT API Async Workers PDF + QR Generation Pytest · 100% Coverage Docker
🏗️

ERP Migration — Odoo v13 → Django Microservices

Odoo v13 · Django · Docker · Fiberlux · 2026–Present
View Case Study

The Challenge

Fiberlux operates a critical production ERP on Odoo v13 managing mass invoicing, CRM, telephony integration, and customer contracts — all heavily customized. A v17 upgrade proved infeasible; deprecated APIs, large data volume, and billing continuity requirements drove the decision toward a full Django rewrite.

Phased Extraction Strategy

  • Phase 1 — Stabilize v13: Resolved production deadlocks via Odoo worker tuning, memory limits, and PostgreSQL connection pooling. Deployed "Testodoo" environment for safe mass validation.
  • Phase 2 — Flat-table Bridge: Migrated first 5 modules using intermediate flat tables — decoupling business logic from Odoo ORM while maintaining data continuity.
  • Phase 3 — Extract to Django: Invoicing engine, Five9 sync, and EV governance fully migrated to standalone Django services with clean REST API boundaries.
  • Phase 4 — Containerization: Dockerizing v13 production base with environment parity across dev, staging, and production.

Status & Impact

0Production deadlocks
5Modules bridged
3Services extracted
100%Coverage standard
Python · Odoo v13 Django REST Framework Docker · Docker Compose PostgreSQL · Tuning Flat-table Bridge Pattern Microservices Architecture

Performance Profiling & Query Optimization

cProfile · SnakeViz · N+1 Queries · PostgreSQL Indexes · Fiberlux · 2025
View Case Study

The Problem

Critical Odoo and Django workflows exhibited unexplained latency under production load. Without systematic profiling, bottleneck identification was guesswork — developers were optimizing the wrong paths while true hotspots remained undetected.

Methodology

  • cProfile + SnakeViz — full call-stack timing; flame graphs to identify dominant call chains.
  • N+1 detection — resolved with select_related() and prefetch_related(), collapsing hundreds of queries into single optimized calls.
  • EXPLAIN ANALYZE — identified sequential scans; created B-Tree composite indexes on FK and date range columns.
  • O(n²) → O(n) — replaced nested loops with set-based lookups and pre-computed dicts outside iteration.

Impact

80%Workflow speed gain
N+1Patterns eliminated
O(n²)→O(n)Loop complexity
Data-drivenOptimization process
cProfile · SnakeViz EXPLAIN ANALYZE PostgreSQL Indexes Django ORM Optimization select_related · prefetch_related
🛠️

Odoo Infrastructure Stabilization — From Brittle to Production-Grade

Linux · Systemd · Odoo v13 · PostgreSQL · VPS Architecture · 2026
View Case Study

The Problem

Two separate VPS environments running Odoo 13 were independently producing 502 Bad Gateway failures and process crashes. Both had been stood up without proper infrastructure configuration — no Swap, no process supervision, and worker settings that either silently disabled all resource limits or set them below the minimum threshold required for startup.

The testapi environment (port 18069, 8 GB RAM VPS) ran in single-threaded mode (workers=0), which silently disables all memory and time limit enforcement in Odoo. It had no Swap, 5.3 GB trapped in OS buffer cache, and was leaking PostgreSQL connections to every database on the server due to a missing dbfilter. The same VPS also hosts the production API (port 8069) — which at the time of intervention had none of these fixes applied, making it an active risk.

The testodoo environment (separate VPS, 16 GB RAM) had the opposite problem: 6 workers configured with limit_memory_hard=2.5 GB — below the ~1.7 GB floor required just to compile the registry of 489 custom modules. Every worker was dying before processing a single request, creating an infinite zombie loop that pinned the CPU without serving any traffic.

Diagnosis & What Made It Non-Trivial

The testodoo failure was especially deceptive. Reducing memory limits to "protect the server" is intuitive — but here it caused the exact opposite: a process supervisor that couldn't stop restarting dead workers. The diagnostic key was in the logs: request_count: 0, registry count: 1 on every death. Workers were being killed during initialization, before serving anything.

The testapi failure was a different class of problem: structural invisibility. With workers=0, Odoo's entire resource control layer — soft/hard memory limits, CPU time limits, worker recycling — is inert. The configuration file had values set, but they were completely ignored at runtime. The server was one heavy API request away from OOM-Killer termination with no recovery path.

Additional root cause: no Swap on either server meant the Linux OOM-Killer had zero room to maneuver. Any RAM spike would terminate processes immediately rather than spilling to disk.

Configuration Changes Applied

ParameterBeforeAfter (testapi)After (testodoo)
workers 0 — all limits inert 2 — preforking active 4 — reduced from 6
limit_memory_soft 2.0 GB (ignored) 2.0 GB (active) 3.0 GB — above registry floor
limit_memory_hard 2.5 GB (ignored / too low) 2.5 GB (active) 4.0 GB — 1 GB headroom over soft
limit_time_cpu 36,000s (10 hours) 600s (10 min) 900s
dbfilter Not set — leaking to all DBs ^testapi$ Scoped to env DB
Swap 0 B — OOM-Killer unprotected 2 GB provisioned 4 GB provisioned

Infrastructure Actions Beyond Config

ActionReasonResult
OS cache purge via drop_caches 5.3 GB locked in buff/cache left only 491 MB free — not enough to start workers 5.3 GB of clean RAM immediately available for Odoo and PostgreSQL
Port cleanup with fuser -k Orphaned sockets from crashed processes blocked clean restart on port 18069 Port fully released; restart succeeded without manual kill loops
Systemd service (odoo13-test.service) Processes had been managed with nohup & — invisible to OS, no restart policy, lost on reboot Restart=on-failure + systemctl enable: auto-recovery and persistence across reboots
Longpolling worker (gevent, port 8072) testodoo had longpolling misconfigured; Nginx was rejecting its connections Dedicated gevent subprocess enabled; basic routing functional. WebSocket upgrade logged as future improvement

Impact

0Crashes post-fix
140msAvg API latency
489Modules in 4.38s
5.3 GBRAM recovered
2Envs stabilized
AutoRecovery on failure
Linux · Bash Systemd Odoo v13 · .odoorc PostgreSQL · Connection Pools Nginx · Reverse Proxy VPS Administration Memory Management Process Supervision

Key Metrics

~170×

Invoice Throughput

From ~2 min/invoice in Odoo to 50 invoices in 35s in Django — 10 concurrent async workers. (Fiberlux)

50k

Recordings Recovered

~50,000 call recordings recovered via cookie-session scraper with atomic checkpoint — zero manual downloads. (Fiberlux)

45d

Data Gap Restored

306 daily CSV files regenerated from master reports; 2,875 corrupt TAC rows removed automatically. (Fiberlux)

30%

Storage Reduction

Automated file sanitization with configurable batch processing on the Five9 SFTP sync module.

Skills

Backend & Frameworks

  • Python (Advanced)
  • Django · Django REST Framework
  • FastAPI
  • Flask
  • Odoo (v13 / v16)
  • Celery

Data & Databases

  • PostgreSQL (Advanced)
  • MySQL · MongoDB
  • Redis (Queue & Cache)
  • Pandas · NumPy
  • Query Optimization
  • EXPLAIN ANALYZE

Testing & Quality

  • Pytest (Advanced)
  • Factory Boy · Mocking
  • TDD / Coverage Analysis
  • Swagger / OpenAPI
  • Integration Testing
  • cProfile · SnakeViz

DevOps & Tooling

  • Docker · Docker Compose
  • GitHub Actions (CI/CD)
  • Linux · Server Management
  • Git
  • AWS (in progress)
  • uv (Python packaging)

Architecture & Automation

  • REST API Design
  • Web Scraping · Requests · BS4
  • Fabric · Paramiko · SFTP
  • Background Task Systems
  • Factory · Strategy Patterns
  • Microservices (learning)

Languages & Community

  • Spanish (Native)
  • English (B2 EFSet Certified)
  • python-docs-es Contributor
  • Open Source Contributor
  • Structured public upskilling

Let's Connect

Open to remote backend roles, Python infrastructure collaboration, and mentorship opportunities.