adds duplicate resolve configuration and labels for Leads
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 8 Apr 2016 09:05:01 +0000 (11:05 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Fri, 8 Apr 2016 09:16:41 +0000 (11:16 +0200)
Change-Id: I2e16e2640e7d4afcfc174b83f0706af019097328
Reviewed-on: http://gerrit.tine20.com/customers/3019
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Crm/js/Model.js

index 3a4bacc..98907bd 100644 (file)
@@ -18,32 +18,32 @@ Ext.namespace('Tine.Crm', 'Tine.Crm.Model');
  * Lead Record Definition
  */ 
 Tine.Crm.Model.Lead = Tine.Tinebase.data.Record.create(Tine.Tinebase.Model.genericFields.concat([
-        {name: 'id',            type: 'string'},
-        {name: 'lead_name',     type: 'string'},
-        {name: 'leadstate_id',  type: 'int'},
-        {name: 'leadtype_id',   type: 'int'},
-        {name: 'leadsource_id', type: 'int'},
-        {name: 'start',         type: 'date', dateFormat: Date.patterns.ISO8601Long},
-        {name: 'description',   type: 'string'},
-        {name: 'end',           type: 'date', dateFormat: Date.patterns.ISO8601Long},
-        {name: 'turnover',      type: 'float'},
-        {name: 'probability',   type: 'int'},
-        {name: 'probableTurnover',   type: 'int'},
-        {name: 'end_scheduled', type: 'date', dateFormat: Date.patterns.ISO8601Long},
-        {name: 'resubmission_date', type: 'date', dateFormat: Date.patterns.ISO8601Long},
+        {name: 'id',            type: 'string', omitDuplicateResolving: true},
+        {name: 'lead_name',     type: 'string', label: 'Lead name', group: 'Lead'},
+        {name: 'leadstate_id',  type: 'int', omitDuplicateResolving: true},
+        {name: 'leadtype_id',   type: 'int', omitDuplicateResolving: true},
+        {name: 'leadsource_id', type: 'int', omitDuplicateResolving: true},
+        {name: 'start',         type: 'date', dateFormat: Date.patterns.ISO8601Long, label: 'Start', group: 'Lead'},
+        {name: 'description',   type: 'string', label: 'Description', group: 'Lead'},
+        {name: 'end',           type: 'date', dateFormat: Date.patterns.ISO8601Long, label: 'End', group: 'Lead'},
+        {name: 'turnover',      type: 'float', omitDuplicateResolving: true},
+        {name: 'probability',   type: 'int', omitDuplicateResolving: true},
+        {name: 'probableTurnover',   type: 'int', omitDuplicateResolving: true},
+        {name: 'end_scheduled', type: 'date', dateFormat: Date.patterns.ISO8601Long, omitDuplicateResolving: true},
+        {name: 'resubmission_date', type: 'date', dateFormat: Date.patterns.ISO8601Long, omitDuplicateResolving: true},
 
-        {name: 'lastread'},
-        {name: 'lastreader'},
-        {name: 'responsible'},
-        {name: 'customer'},
-        {name: 'partner'},
-        {name: 'tasks'},
-        {name: 'relations'},
-        {name: 'products'},
-        {name: 'tags'},
-        {name: 'notes'},
+        {name: 'lastread', omitDuplicateResolving: true},
+        {name: 'lastreader', omitDuplicateResolving: true},
+        {name: 'responsible', omitDuplicateResolving: true},
+        {name: 'customer', omitDuplicateResolving: true, label: 'Customer', group: 'Relationen'},
+        {name: 'partner', omitDuplicateResolving: true, label: 'Partner', group: 'Relationen'},
+        {name: 'tasks', omitDuplicateResolving: true},
+        {name: 'relations', omitDuplicateResolving: true},
+        {name: 'products', omitDuplicateResolving: true, label: 'Products', group: 'Relationen'},
+        {name: 'tags', label: 'Tags'},
+        {name: 'notes', omitDuplicateResolving: true},
         {name: 'customfields', omitDuplicateResolving: true},
-        {name: 'attachments'}
+        {name: 'attachments', omitDuplicateResolving: true}
     ]), {
     appName: 'Crm',
     modelName: 'Lead',