2014-02-05 2 views
8

나는이 기본 질문을 묻는 것에 대해 openerp와 미안하다.오프라인 모드에서 openerp 작업

openERP가 서버 [오프라인 모드]에 연결되어 있지 않지만 사용자 정의 모듈의 데이터를 저장하고 검색 할 수 있습니까? '예'일 경우 오프라인으로 작업 할 수 있도록 맞춤 모듈을 만드는 과정에서 따라야 할 단계는 무엇입니까? 데이터는 어떻게 동기화됩니까? 오프라인 모드에서 openerp 연결하는 방법을

답변

3

귀하의 질문은 너무 기본적인 아니다 [오프라인 데이터 저장 용량 제한에 대해 우려하지]. 기본적으로 OpenERP에는 오프라인 모드가 없습니다. 그러나 오픈 소스이며 완전히 확장 가능한 OpenERP를 사용하면 혼자서 할 수 있습니다.

HTML5 Web Storage을 사용하여 이러한 기능을 구현할 수 있습니다. 웹 브라우저에 로컬로 데이터를 저장할 수 있습니다. 구현시 시작시 및 데이터 동기화시 데이터 검색을 담당합니다. 물론 저장 용량 제한 (브라우저에 따라 5MB 또는 10MB와 같은) 및 성능 문제와 같은 몇 가지 제약 사항에 직면하게 될 것입니다.

OpenERP의 Point Of Sale 모듈은 이러한 로컬 저장소를 구현합니다. 더 이상 사용되지는 않았지만 예제로 사용할 수는 있습니다. 이 모듈의 로컬 스토리지 기능을 구현하는 자바 스크립트 (여기서는 db.js)를 살펴 보시기 바랍니다.

이 모듈은 오프라인 구현의 좋은 예가 될 수 있습니다. 그럼에도 불구하고 오프라인 모드는 모듈에서 더 이상 사용되지 않습니다. 좋은 추론은 db.js 파일의 시작 부분에서 주석에 주어진 경우 : PROMT 응답에 대한

/* 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. 
*/ 
+0

감사합니다. 한편 Point of Sale 모듈을 설치했으며 온라인 모드로 잘 작동합니다. 나중에 오프라인 모드의 유효성을 검사하기 위해 openerp 서비스를 사용 중지했습니다. 여기서는 오프라인 판매 시점 모듈을 시작하는 방법을 잘 모르겠습니다. 제발 도와주세요 – user3276175

+0

현재 오프라인 모드에서 작동한다고 생각하지 않습니다. 내 업데이트 된 답변을 참조하십시오. –

관련 문제