summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src/js/graph.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2011-09-26 18:01:11 +0200
committerXavier Morel <xmo@openerp.com>2011-09-26 18:01:11 +0200
commit5a17f5030a3b7e2c0489b8637eeae672519b7183 (patch)
treed3133a69354776344f244cb79e589eef9f653697 /addons/web_graph/static/src/js/graph.js
parentbd3b4c68ea19201879454a173f37c9879fa9f344 (diff)
[REM] useless fields
bzr revid: xmo@openerp.com-20110926160111-rk032zr2lylk1hlx
Diffstat (limited to 'addons/web_graph/static/src/js/graph.js')
-rw-r--r--addons/web_graph/static/src/js/graph.js19
1 files changed, 7 insertions, 12 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js
index 6287627d950..0de8d816cce 100644
--- a/addons/web_graph/static/src/js/graph.js
+++ b/addons/web_graph/static/src/js/graph.js
@@ -39,25 +39,20 @@ openerp.web_graph.GraphView = openerp.web.View.extend({
view_id: this.view_id,
view_type: 'graph'
})).then(function (fields_result, view_result) {
- self.on_loaded({
- all_fields: fields_result[0],
- fields_view: view_result[0]
- });
+ self.fields = fields_result[0];
+ self.fields_view = view_result[0];
+ self.on_loaded();
});
},
- on_loaded: function(data) {
- this.all_fields = data.all_fields;
- this.fields_view = data.fields_view;
- this.name = this.fields_view.name || this.fields_view.arch.attrs.string;
- this.view_id = this.fields_view.view_id;
+ on_loaded: function() {
this.chart = this.fields_view.arch.attrs.type || 'pie';
- this.fields = this.fields_view.fields;
+ this.orientation = this.fields_view.arch.attrs.orientation || 'vertical';
+
this.chart_info_fields = [];
this.operator_field = '';
this.operator_field_one = '';
this.operator = [];
this.group_field = [];
- this.orientation = this.fields_view.arch.attrs.orientation || '';
_.each(this.fields_view.arch.children, function (field) {
if (field.attrs.operator) {
this.operator.push(field.attrs.name);
@@ -95,7 +90,7 @@ openerp.web_graph.GraphView = openerp.web.View.extend({
result[field_name] = field_value[field_value.length - 1];
}
if (typeof field_value == 'string') {
- var choices = this.all_fields[field_name]['selection'];
+ var choices = this.fields[field_name]['selection'];
_.each(choices, function (choice) {
if (field_value == choice[0]) {
result[field_name] = choice;