Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在脱机模式下使用openerp_Openerp_Offline - Fatal编程技术网

在脱机模式下使用openerp

在脱机模式下使用openerp,openerp,offline,Openerp,Offline,我是openerp的新手,很抱歉问了这个基本问题 当openERP未连接到服务器[脱机模式]时,我们是否可以保存和检索自定义模块的数据。如果“是”,则在创建自定义模块以便脱机工作时应遵循哪些步骤。数据是如何同步的?如何在脱机模式下连接openerp [不关心离线数据存储限制]你的问题不是那么基本。本机OpenERP没有脱机模式。但是开源和完全可扩展的OpenERP允许您自己完成这项工作 您可以使用HTML5实现这样的功能。它允许您在web浏览器中本地存储数据。您的实现将负责启动时的数据检索和数据

我是openerp的新手,很抱歉问了这个基本问题

当openERP未连接到服务器[脱机模式]时,我们是否可以保存和检索自定义模块的数据。如果“是”,则在创建自定义模块以便脱机工作时应遵循哪些步骤。数据是如何同步的?如何在脱机模式下连接openerp


[不关心离线数据存储限制]

你的问题不是那么基本。本机OpenERP没有脱机模式。但是开源和完全可扩展的OpenERP允许您自己完成这项工作

您可以使用HTML5实现这样的功能。它允许您在web浏览器中本地存储数据。您的实现将负责启动时的数据检索和数据同步。当然,您将面临一些限制,例如存储限制(取决于浏览器-大约5MB或10MB)和性能问题

OpenERP模块实现了这种本地存储。我不确定它是否被使用了,但你可以用它作为例子。您可能想在这里看看实现此模块本地存储功能的Javascript-

这个模块可以作为离线实现的好例子。然而,模块中不再使用脱机模式。db.js文件开头的注释给出了一个很好的理由:


谢谢你的回复。同时,我已经安装了销售点模块,它与在线模式工作良好。后来我关闭了openerp服务以验证脱机模式。在这里,我不确定如何启动离线销售点模块。请在这方面帮助我,我认为它目前无法在脱机模式下工作。请看我的最新答案。
 /* The db module was intended to be used to store all the data needed to run the Point
 * of Sale in offline mode. (Products, Categories, Orders, ...) It would also use WebSQL
 * or IndexedDB to make the searching and sorting products faster. It turned out not to be
 * a so good idea after all.
  *
 * First it is difficult to make the Point of Sale truly independant of the server. A lot
 * of functionality cannot realistically run offline, like generating invoices.
 *
 * IndexedDB turned out to be complicated and slow as hell, and loading all the data at the
 * start made the point of sale take forever to load over small connections.
 *
 * LocalStorage has a hard 5.0MB on chrome. For those kind of sizes, it is just better
 * to put the data in memory and it's not too big to download each time you launch the PoS.
  *
 * So at this point we are dropping the support for offline mode, and this module doesn't really
 * make sense anymore. But if at some point you want to store millions of products and if at
 * that point indexedDB has improved to the point it is usable, you can just implement this API.
 *
 * You would also need to change the way the models are loaded at the start to not reload all your
 * product data.
 */