|
@@ -21,7 +21,7 @@ angular.module('odoo')
|
|
|
|
|
|
} else {
|
|
|
|
|
|
- odooInteroperabilityFactory.read('crm.lead', [['active', '=', true]], configuration, function (response) {
|
|
|
+ odooInteroperabilityFactory.read('crm.lead', [['type', '=', 'lead']], configuration, function (response) {
|
|
|
success(response);
|
|
|
}, function (odooErr) {
|
|
|
error(odooErr);
|
|
@@ -119,7 +119,7 @@ angular.module('odoo')
|
|
|
|
|
|
// Send all new data from local to remote server
|
|
|
var syncNewData = function (success, error) {
|
|
|
- get("remote_id = 0 AND type = 'lead'", function (newLeads) {
|
|
|
+ get('remote_id = 0', function (newLeads) {
|
|
|
asyncLoopFactory(newLeads.length, function (loop) {
|
|
|
var data = newLeads.item(loop.iteration());
|
|
|
|
|
@@ -140,7 +140,7 @@ angular.module('odoo')
|
|
|
|
|
|
// Update all data from server
|
|
|
var syncUpdatedData = function (success, error) {
|
|
|
- get("remote_id != 0 AND modified = 1 AND type = 'lead'", function (updatedLeads) {
|
|
|
+ get("remote_id != 0 AND modified = 1", function (updatedLeads) {
|
|
|
asyncLoopFactory(updatedLeads.length, function (loop) {
|
|
|
var data = updatedLeads.item(loop.iteration());
|
|
|
|
|
@@ -161,7 +161,7 @@ angular.module('odoo')
|
|
|
|
|
|
// Delete all data
|
|
|
var syncDeletedData = function (success, error) {
|
|
|
- get("remote_id != 0 AND modified = 2 AND type = 'lead'", function (deletedLeads) {
|
|
|
+ get('remote_id != 0 AND modified = 2', function (deletedLeads) {
|
|
|
asyncLoopFactory(deletedLeads.length, function (loop) {
|
|
|
var id = deletedLeads.item(loop.iteration()).remote_id;
|
|
|
|