Projects
Saas Odoo 18
The business consists of two family-run shops: a lottery agency and a convenience store. Both sell on credit, keep a daily cash register and needed to see from their phone how much each customer owes, how the cash register is doing and whether sales targets are being met...
Role: sole developer: analysis → development → infrastructure → operation.
Period: April – November 2026.
Key results
• 6,970 products migrated, 6,877 with barcodes verified one by one.
• 5.9 s → 79 ms on the app's critical query, diagnosed in production.
• 26 s → 10 s to open the cash register, after fixing an Odoo N+1 issue.
1. What the project is
The business consists of two family-run shops: a lottery agency and a convenience store. Both sell on credit accounts, keep a daily cash register, and needed to see from a phone how much each customer owes, how the cash register is doing, and whether sales targets are being met. Since the developer lives on another continent, everything was designed to be operated remotely.
The two systems
• Management app (React Native · Supabase). Customer credit accounts, daily cash register, targets and statistics for both businesses, with data isolated by business and by role. Used by owners and employees, from a phone or browser. Status: in production since April 2026.
• Odoo 18 Community + custom module (Python · OWL/JS). The store's point of sale: 7,000 barcoded products, sales, credit sales and Argentine electronic invoicing. Used by the cashier staff and the administrator. Status: deployed on our own server in November 2026, in testing with real data.
The two systems talk to each other: every night the app reads the day's sales from Odoo (cash, card, credit sales and collections) so the store's cash register appears in the app without manual entry.
Before the project, the store ran on an unsupported Odoo 11 Community, on a server exposed to the internet without HTTPS and with the database manager accessible from outside. Replacing it without losing customers, balances or barcodes was the core of the work.
2. General architecture
Two systems, each with its own database and its own deployment. The only point of contact between them is the nightly synchronization.
Management app
Owners and employees · phone or browser
• Expo / React Native app (TypeScript): expo-router, Zustand, NativeWind; web version on Vercel.
• Supabase: Auth + PostgreSQL: RLS per organization and per role, pg_cron. Tables: clients, transactions, metas, profiles.
• Edge Functions (Deno): odoo-sync (day's sales, idempotent) and invite-user (user onboarding).
Point-of-sale server
Store registers · browser
• Caddy · HTTPS (Let's Encrypt): own domain, only ports 80 and 443 open, database manager closed off.
• Odoo 18 Community + eltio_pos module: workers=2, listens only on 127.0.0.1, l10n_ar and electronic invoicing.
• PostgreSQL 16 with daily backups.
• ARCA (WSFEv1): external service that issues the CAE.
Nightly synchronization via JSON-RPC: cash, card, credit sales and collections.
On the server, Odoo is never exposed directly to the internet: only Caddy listens externally, with an automatic certificate, and forwards requests to Odoo over the internal Docker network.
3. Management app: stack
A single codebase in React Native + Expo that runs as a web app (deployed on Vercel, with automatic deployment from main) and as a mobile app. The backend is Supabase: there is no server of our own, access logic lives in the database, and anything that doesn't fit there goes into Edge Functions.
• UI: React Native 0.81, React 19, Expo 54, expo-router 6. File-based navigation; the same screen serves web and mobile.
• Styling: NativeWind 4. Utility classes shared across platforms.
• State: Zustand 5. A global store with narrow selectors: each component subscribes only to what it uses.
• Data and auth: @supabase/supabase-js 2. Direct queries to PostgreSQL under RLS; sessions via Supabase Auth.
• Charts: react-native-svg. Target-achievement radar and statistics.
• Language: TypeScript.
4. Odoo synchronization and performance
The app's Business Cash Register is not entered by hand: a scheduled Edge Function connects every night to Odoo via JSON-RPC, reads the day's sales and records them in the app by category (cash, card, credit sales and collections). It is idempotent: a repeated run duplicates nothing. The Total Credit Sales panel was built on this data, grouping transactions by person and opening each person's account statement.
Two performance problems that appeared in production (a repeated load per row on the client and a balance query that exceeded the database's maximum time) were diagnosed with measurement tools before touching any code, and fixed with targeted changes: the critical query went from 5.9 s to 79 ms. In both cases the first hypothesis proved false when measured, and the method became a project rule: measure before fixing.
5. Odoo: starting point and decision
The first step was to confirm with data what existed: a full backup of the old system was downloaded and its manifest.json and SQL dump were audited.
The old system
• Version: Odoo 11.0 Community, out of support; PostgreSQL 9.5.
• Where: VPS with IP address:8069 exposed to the internet, no HTTPS, and the database manager accessible from outside.
• Modules: 70 installed, 36 third-party (ADHOC's Argentine localization, pos_debt_notebook for credit sales, electronic invoicing in the POS).
• Products: 6,970, of which 6,877 have barcodes and no duplicate codes.
• Customers: 149 contacts; 12 with outstanding debt.
• Sales: 36,511 point-of-sale orders since 2019.
• Stock: unusable: 2,924 products in negative, last adjustment in 2024.
• Electronic invoicing: active but marginal: 14 invoices so far in 2026.
Decisions, with their reasons
• New installation, not a database migration. Jumping from 11 to 18 with 36 third-party modules that the official migration does not cover is long and risky. Products, customers and balances are imported; the old database is kept as a reference archive.
• Odoo 18, not 19. The official electronic invoicing module (l10n_ar_edi) is Enterprise-only. A community fork (odoo-argentina-ce, AGPL-3) solves it for free, and its newest branch is 18.0.
• Not migrating stock. It does not reflect reality; the new system starts with a physical count.
• Prices with VAT included. Replicates current behavior: the customer pays the price on the label.
• No custom invoicing against ARCA. Ticket signing, SOAP, synchronized numbering, QR codes and credit notes: if it gets out of sync, it is a tax problem for the business, not a bug. Community modules are used instead.
• Own server instead of the shop's PC. The attempt to install on the store's PC ran into administrator permissions and virtualization disabled in the BIOS; administering from another continent, a server is the sustainable option.
The whole trial was first run on the development machine, with real data, before touching anything in the business.
6. Custom module eltio_pos
A single Odoo module (Python + OWL/JavaScript) with everything the business needed and Community does not provide. It is built with inheritance (_inherit, patch() for OWL components, QWeb template extension via XPath) and without copying Odoo code, so it survives updates.

Sales screen on the production server: next to the customer selector, the «Cobrar cta. cte.» button added by the module.
What it adds
• Credit account collection directly from the cash register.
• Real customer balance, including unclosed sessions.
• Readable order list: credit sales, collections and running balance.
• Wildcard products with «Precio primero», pinned to the start of the grid.
• Enter confirms the payment.
• No tax breakdown on screen (ticket and invoice unchanged).
• The invoice is no longer checked automatically: the cashier decides.
• Cash register opening 2.5 times faster.

The grid with the wildcard product pinned to the top by sequence, without the space in the name the business used; the numbers are the quantities in the current order.
7. Performance: opening the cash register went from 26 s to 10 s
The business said it was «sometimes slow». Instead of guessing, request timings logged by Odoo were measured: the slow part was always the initial load of the point of sale, with about 7,150 SQL queries per opening, nearly one per product, which points to an N+1 issue in Odoo's standard code for product variants.
Since no product in this catalog has variants, the fix in the custom module delegates to Odoo only the templates that do have them, in a ten-line override. Measured with the same tool before and after (3 attempts, ~7,000 products), the average went from 25.9 s to 11.8 s. The real consumption measurement (265 MB at rest, 361 MB at the opening peak) also served to size the server.
8. Infrastructure and deployment
One server, three containers; Odoo never listens externally.
• Source: GitHub (private repository), cloned on the server.
• Server: Linux, Ubuntu 24.04, with Docker Compose.
• Containers: Caddy (HTTPS, the only one exposed to the internet), Odoo 18 + eltio_pos and PostgreSQL 16.
• Data: Docker volumes and scheduled backups.
The entire environment is a docker-compose.yml with three services (Caddy, Odoo and PostgreSQL) and an Odoo image built from a custom Dockerfile, so a reinstall reproduces exactly what was tested.
A repeatable installer sets up a new machine end to end: requirements, randomly generated credentials, a database without demo data, modules, company configuration, data import and scheduled backups; running it twice changes nothing.
The server (2 vCPU, 4 GB) was sized using the project's consumption measurements, and updating is a git pull plus a module update with Odoo briefly stopped.
9. Security
The previous system had its database manager open to the internet, and that set the minimum standard for the new one. Security was handled in layers:
• Network: firewall and internal services with no exposure.
• Server access: SSH key only.
• Traffic: HTTPS with automatic certificates and strict headers.
• Application: Odoo hardening; one account per person with permission profiles.
• Secrets: kept out of the repository, with automatic scanning on every commit.
• System: automatic security updates.
Each measure was verified, not assumed: the final review was done from outside, as an attacker would see it, and from inside, with tools that show the effective configuration rather than the intended one, and it is repeated after every infrastructure change. Outstanding items (login attempt limits, second factor on admin accounts, periodic rebuilding of images) are noted with their priority.
10. Technologies and tools
• Mobile/web app: React Native 0.81, React 19, Expo 54, expo-router 6, TypeScript, NativeWind 4, Zustand 5, react-native-svg.
• App backend: Supabase: PostgreSQL with Row Level Security, Auth, Edge Functions (Deno/TypeScript), pg_cron, views with security_invoker, SECURITY DEFINER functions.
• App deployment: Vercel (continuous deployment from main).
• ERP / point of sale: Odoo 18 Community with Argentine localization.
• Electronic invoicing: odoo-argentina-ce, pyafipws, M2Crypto, ARCA's WSAA and WSFEv1 web services.
• Odoo development: Python 3.12, Odoo ORM, model and view inheritance (XML/XPath), OWL (JavaScript) with component patching and QWeb template inheritance, XML-RPC and JSON-RPC.
• Infrastructure: Docker and Docker Compose (profiles), Caddy 2 (automatic HTTPS, reverse proxy, websocket), PostgreSQL 16, Ubuntu Server 24.04, cloud VPS, own DNS.
• Security: ufw, fail2ban, SSH with key, HSTS, secret scanning in pre-commit, read-only deploy keys, credential rotation.
• Operations: Bash, cron, Cloudflare Tunnel for testing, log monitoring, verified backups and tested restores.
• Diagnostics: EXPLAIN ANALYZE, Supabase and PostgreSQL logs, browser DevTools, per-request queries in Odoo, docker stats.
• Version control: Git, GitHub (private repository), commits with context and reasoning.
Technical project report. The figures come from measurements and verifications made during the work and are recorded in the repository log.