Skip to Content
Menú
This question has been flagged
7 Respostes
10866 Vistes

Hello,

what happens if I am working in POS on PC and I suddenly lose an internet connection? If I close the POS, im screwed, so I keep it open and continue selling. But how does the POS know what items are in my stock? Does data store localy in browser? Or somewhere permanently on hard drive?  What happens when I get an internet connection back, does the data sync (invoices and stock) ?

Avatar
Descartar

When the POS module is started everything is loaded in the cache thanks to the javascript framework that is implemented (backbonejs). This gets all data and makes it available in the POS up untill you close it, then backbonejs will write the new records etc in your Odoo db.

Autor

Cache of hard drive or browser ? If my browser (lets say Chrome for example) crashes, then I lose my entire work?

I think it is actually cached in the (virtual) memory of your server, so the computer/server where your Odoo is installed on will load all the values in its memory.

Autor

I am talking about losing data in offline mode, if my Chrome crashes. So if i work offline and my Chrome crashes then i lose all the data. Am I right?

Correct, if there is no internet and your browser crashes or your pc goes down you should have lost all the data. But I'd like a second confirmation on this :)

Best Answer

Yes, it's stored locally in js variable localStorage . Check addons/point_of_sale/static/src/js/db.js

If you lost internet connection and close browser, then transactions would be restored at the next session. But you have to open the same browser on the same computer and browser's cache should be there.

Avatar
Descartar

Hi Ivan,

Instead of Browser Cache, can we store the POS Data into an external database i.e. Postgresql or MySQL installed on the POS System ?

Autor Best Answer

Ivan your explanation seems to be the most logical answer. Thank you 

Avatar
Descartar