square basin
One-way sync, POS → website (not two-way). The POS is where real stock changes happen (in-store sales), so it should be the source of truth. The website just reads and mirrors it — this avoids race conditions and conflicting writes between two systems. Matching key: barcode. Your Product model already has a barcode field — as long as the same barcode exists in both systems for a given product, that's the reliable link between them. (If the POS uses SKU instead, that works too, but we need consistency.) A scheduled sync job, not real-time — a Django management command that connects to the POS database, reads current stock per barcode, and updates Product.quantity on your site. Run every few minutes via cron (if your server is Linux) or Task Scheduler (if Windows), rather than trying to hook into the POS's internals directly, which is fragile and vendor-dependent. Read-only connection to the POS database — Django will only run SELECT queries against it, never write, so there's no risk of corrupting the POS's own data even if something in the sync logic is wrong. Once I know the POS product and can see (or you can tell me) its actual table/column structure, I'll write the exact settings.py database config, the sync management command, and the cron/Task Scheduler setup.
One-way sync, POS → website (not two-way). The POS is where real stock changes happen (in-store sales), so it should be the source of truth. The website just reads and mirrors it — this avoids race conditions and conflicting writes between two systems. Matching key: barcode. Your Product model already has a barcode field — as long as the same barcode exists in both systems for a given product, that's the reliable link between them. (If the POS uses SKU instead, that works too, but we need consistency.) A scheduled sync job, not real-time — a Django management command that connects to the POS database, reads current stock per barcode, and updates Product.quantity on your site. Run every few minutes via cron (if your server is Linux) or Task Scheduler (if Windows), rather than trying to hook into the POS's internals directly, which is fragile and vendor-dependent. Read-only connection to the POS database — Django will only run SELECT queries against it, never write, so there's no risk of corrupting the POS's own data even if something in the sync logic is wrong. Once I know the POS product and can see (or you can tell me) its actual table/column structure, I'll write the exact settings.py database config, the sync management command, and the cron/Task Scheduler setup.