summaryrefslogtreecommitdiff
path: root/addons/web_graph
diff options
context:
space:
mode:
authorVidhin Mehta (OpenERP) <vme@tinyerp.com>2014-05-05 10:02:33 +0530
committerVidhin Mehta (OpenERP) <vme@tinyerp.com>2014-05-05 10:02:33 +0530
commite41508cb8d7fd2a2c06e3fab9ce1503e8efa30fa (patch)
tree8e0fbb849cebc9b3ac0f87355a5248f51826a491 /addons/web_graph
parent4312b921f3db41529cbd4f501a6b5dcba2bebd08 (diff)
parent8fbebfd752fa8933584711522675d354b3217839 (diff)
[MERGE]Trunk.
bzr revid: vme@tinyerp.com-20140505043233-2t2e2vb1yv86hyxp
Diffstat (limited to 'addons/web_graph')
-rw-r--r--addons/web_graph/__openerp__.py11
-rw-r--r--addons/web_graph/i18n/ar.po2
-rw-r--r--addons/web_graph/i18n/bg.po2
-rw-r--r--addons/web_graph/i18n/bn.po2
-rw-r--r--addons/web_graph/i18n/bs.po2
-rw-r--r--addons/web_graph/i18n/ca.po2
-rw-r--r--addons/web_graph/i18n/cs.po2
-rw-r--r--addons/web_graph/i18n/da.po2
-rw-r--r--addons/web_graph/i18n/de.po2
-rw-r--r--addons/web_graph/i18n/en_AU.po2
-rw-r--r--addons/web_graph/i18n/en_GB.po2
-rw-r--r--addons/web_graph/i18n/es.po2
-rw-r--r--addons/web_graph/i18n/es_CL.po2
-rw-r--r--addons/web_graph/i18n/es_CR.po2
-rw-r--r--addons/web_graph/i18n/es_DO.po2
-rw-r--r--addons/web_graph/i18n/es_EC.po2
-rw-r--r--addons/web_graph/i18n/es_MX.po2
-rw-r--r--addons/web_graph/i18n/et.po2
-rw-r--r--addons/web_graph/i18n/fa.po2
-rw-r--r--addons/web_graph/i18n/fi.po2
-rw-r--r--addons/web_graph/i18n/fr.po2
-rw-r--r--addons/web_graph/i18n/fr_CA.po2
-rw-r--r--addons/web_graph/i18n/gl.po2
-rw-r--r--addons/web_graph/i18n/gu.po2
-rw-r--r--addons/web_graph/i18n/he.po2
-rw-r--r--addons/web_graph/i18n/hr.po2
-rw-r--r--addons/web_graph/i18n/hu.po2
-rw-r--r--addons/web_graph/i18n/it.po2
-rw-r--r--addons/web_graph/i18n/ja.po2
-rw-r--r--addons/web_graph/i18n/ka.po2
-rw-r--r--addons/web_graph/i18n/ko.po2
-rw-r--r--addons/web_graph/i18n/lt.po2
-rw-r--r--addons/web_graph/i18n/mk.po2
-rw-r--r--addons/web_graph/i18n/mn.po2
-rw-r--r--addons/web_graph/i18n/nb.po2
-rw-r--r--addons/web_graph/i18n/nl.po2
-rw-r--r--addons/web_graph/i18n/nl_BE.po2
-rw-r--r--addons/web_graph/i18n/pl.po2
-rw-r--r--addons/web_graph/i18n/pt.po2
-rw-r--r--addons/web_graph/i18n/pt_BR.po2
-rw-r--r--addons/web_graph/i18n/ro.po2
-rw-r--r--addons/web_graph/i18n/ru.po2
-rw-r--r--addons/web_graph/i18n/sl.po2
-rw-r--r--addons/web_graph/i18n/sq.po2
-rw-r--r--addons/web_graph/i18n/sr@latin.po2
-rw-r--r--addons/web_graph/i18n/sv.po2
-rw-r--r--addons/web_graph/i18n/th.po2
-rw-r--r--addons/web_graph/i18n/tr.po2
-rw-r--r--addons/web_graph/i18n/zh_CN.po2
-rw-r--r--addons/web_graph/static/src/js/graph_view.js4
-rw-r--r--addons/web_graph/static/src/js/graph_widget.js183
-rw-r--r--addons/web_graph/static/src/js/pivot_table.js11
-rw-r--r--addons/web_graph/static/src/xml/web_graph.xml3
-rw-r--r--addons/web_graph/views/web_graph.xml19
54 files changed, 186 insertions, 141 deletions
diff --git a/addons/web_graph/__openerp__.py b/addons/web_graph/__openerp__.py
index 790dbe85c44..85c1283dfad 100644
--- a/addons/web_graph/__openerp__.py
+++ b/addons/web_graph/__openerp__.py
@@ -14,15 +14,8 @@ Graph Views for Web Client.
""",
'version': '3.0',
'depends': ['web'],
- 'js': [
- 'static/lib/nvd3/d3.v3.js',
- 'static/lib/nvd3/nv.d3.js',
- 'static/src/js/graph_view.js',
- 'static/src/js/pivot_table.js',
- 'static/src/js/graph_widget.js',
- ],
- 'css': [
- 'static/src/css/*.css',
+ 'data' : [
+ 'views/web_graph.xml',
],
'qweb' : [
'static/src/xml/*.xml',
diff --git a/addons/web_graph/i18n/ar.po b/addons/web_graph/i18n/ar.po
index 139f117a088..a4ce2a68fdf 100644
--- a/addons/web_graph/i18n/ar.po
+++ b/addons/web_graph/i18n/ar.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/bg.po b/addons/web_graph/i18n/bg.po
index 01d05d1a65e..54207287ab7 100644
--- a/addons/web_graph/i18n/bg.po
+++ b/addons/web_graph/i18n/bg.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/bn.po b/addons/web_graph/i18n/bn.po
index be44b553b03..357ffe49d32 100644
--- a/addons/web_graph/i18n/bn.po
+++ b/addons/web_graph/i18n/bn.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/bs.po b/addons/web_graph/i18n/bs.po
index 28d88294517..16b40383c5b 100644
--- a/addons/web_graph/i18n/bs.po
+++ b/addons/web_graph/i18n/bs.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/ca.po b/addons/web_graph/i18n/ca.po
index 19f873ccf7c..7a3564a8f7d 100644
--- a/addons/web_graph/i18n/ca.po
+++ b/addons/web_graph/i18n/ca.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/cs.po b/addons/web_graph/i18n/cs.po
index 877aaf28893..09572c410f1 100644
--- a/addons/web_graph/i18n/cs.po
+++ b/addons/web_graph/i18n/cs.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/da.po b/addons/web_graph/i18n/da.po
index 331eff06bc9..8b6d9872a99 100644
--- a/addons/web_graph/i18n/da.po
+++ b/addons/web_graph/i18n/da.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/de.po b/addons/web_graph/i18n/de.po
index cb64d594ac2..e3761f90a6d 100644
--- a/addons/web_graph/i18n/de.po
+++ b/addons/web_graph/i18n/de.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/en_AU.po b/addons/web_graph/i18n/en_AU.po
index 589fec49159..92976c9bca5 100644
--- a/addons/web_graph/i18n/en_AU.po
+++ b/addons/web_graph/i18n/en_AU.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/en_GB.po b/addons/web_graph/i18n/en_GB.po
index 7cc8f41cfe3..c01f6d721b0 100644
--- a/addons/web_graph/i18n/en_GB.po
+++ b/addons/web_graph/i18n/en_GB.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/es.po b/addons/web_graph/i18n/es.po
index 20ef2dfe49b..1725cc59f3c 100644
--- a/addons/web_graph/i18n/es.po
+++ b/addons/web_graph/i18n/es.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/es_CL.po b/addons/web_graph/i18n/es_CL.po
index c480b1520d1..f2a6c73e37d 100644
--- a/addons/web_graph/i18n/es_CL.po
+++ b/addons/web_graph/i18n/es_CL.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/es_CR.po b/addons/web_graph/i18n/es_CR.po
index ff1c136269d..30d598242ac 100644
--- a/addons/web_graph/i18n/es_CR.po
+++ b/addons/web_graph/i18n/es_CR.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/es_DO.po b/addons/web_graph/i18n/es_DO.po
index e36cea4be83..26146369143 100644
--- a/addons/web_graph/i18n/es_DO.po
+++ b/addons/web_graph/i18n/es_DO.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/es_EC.po b/addons/web_graph/i18n/es_EC.po
index 698ac517bb2..21dac0c3614 100644
--- a/addons/web_graph/i18n/es_EC.po
+++ b/addons/web_graph/i18n/es_EC.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/es_MX.po b/addons/web_graph/i18n/es_MX.po
index 2011daa1b2f..f2349d82caf 100644
--- a/addons/web_graph/i18n/es_MX.po
+++ b/addons/web_graph/i18n/es_MX.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/et.po b/addons/web_graph/i18n/et.po
index 3f3f71ee231..fd3d590ce67 100644
--- a/addons/web_graph/i18n/et.po
+++ b/addons/web_graph/i18n/et.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/fa.po b/addons/web_graph/i18n/fa.po
index 148e9a03059..25035a8034a 100644
--- a/addons/web_graph/i18n/fa.po
+++ b/addons/web_graph/i18n/fa.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/fi.po b/addons/web_graph/i18n/fi.po
index eeb014f4032..75dcda30f68 100644
--- a/addons/web_graph/i18n/fi.po
+++ b/addons/web_graph/i18n/fi.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/fr.po b/addons/web_graph/i18n/fr.po
index 7c3924df977..a2b58ef93ca 100644
--- a/addons/web_graph/i18n/fr.po
+++ b/addons/web_graph/i18n/fr.po
@@ -15,7 +15,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/fr_CA.po b/addons/web_graph/i18n/fr_CA.po
index d0835bf2c75..27c0282f6f2 100644
--- a/addons/web_graph/i18n/fr_CA.po
+++ b/addons/web_graph/i18n/fr_CA.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/gl.po b/addons/web_graph/i18n/gl.po
index 199c68d0a36..671a1b1f2af 100644
--- a/addons/web_graph/i18n/gl.po
+++ b/addons/web_graph/i18n/gl.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/gu.po b/addons/web_graph/i18n/gu.po
index a40afd18997..505723aad9a 100644
--- a/addons/web_graph/i18n/gu.po
+++ b/addons/web_graph/i18n/gu.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/he.po b/addons/web_graph/i18n/he.po
index 624c7835506..11050f22155 100644
--- a/addons/web_graph/i18n/he.po
+++ b/addons/web_graph/i18n/he.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/hr.po b/addons/web_graph/i18n/hr.po
index a7c0adf0281..4ae91d533c6 100644
--- a/addons/web_graph/i18n/hr.po
+++ b/addons/web_graph/i18n/hr.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/hu.po b/addons/web_graph/i18n/hu.po
index 1864fb5ef23..0b2bc83c5e6 100644
--- a/addons/web_graph/i18n/hu.po
+++ b/addons/web_graph/i18n/hu.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/it.po b/addons/web_graph/i18n/it.po
index fda89ac1f56..0ee1fee88d9 100644
--- a/addons/web_graph/i18n/it.po
+++ b/addons/web_graph/i18n/it.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/ja.po b/addons/web_graph/i18n/ja.po
index e3a5cc77dd8..c9621fb5a61 100644
--- a/addons/web_graph/i18n/ja.po
+++ b/addons/web_graph/i18n/ja.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/ka.po b/addons/web_graph/i18n/ka.po
index 74d697b8bc8..b380aa59a94 100644
--- a/addons/web_graph/i18n/ka.po
+++ b/addons/web_graph/i18n/ka.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/ko.po b/addons/web_graph/i18n/ko.po
index 4d658245f59..6245d2b07bc 100644
--- a/addons/web_graph/i18n/ko.po
+++ b/addons/web_graph/i18n/ko.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/lt.po b/addons/web_graph/i18n/lt.po
index 5f35be995f6..f480e629a6a 100644
--- a/addons/web_graph/i18n/lt.po
+++ b/addons/web_graph/i18n/lt.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/mk.po b/addons/web_graph/i18n/mk.po
index 2dc5d811c02..6cfb261b598 100644
--- a/addons/web_graph/i18n/mk.po
+++ b/addons/web_graph/i18n/mk.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/mn.po b/addons/web_graph/i18n/mn.po
index dfe35b0b2cc..577a231cd2f 100644
--- a/addons/web_graph/i18n/mn.po
+++ b/addons/web_graph/i18n/mn.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/nb.po b/addons/web_graph/i18n/nb.po
index 72bea187685..2f3f618c5f6 100644
--- a/addons/web_graph/i18n/nb.po
+++ b/addons/web_graph/i18n/nb.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/nl.po b/addons/web_graph/i18n/nl.po
index fe092ea5b54..797b104dd34 100644
--- a/addons/web_graph/i18n/nl.po
+++ b/addons/web_graph/i18n/nl.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/nl_BE.po b/addons/web_graph/i18n/nl_BE.po
index 85c31713aeb..cb5e17915d9 100644
--- a/addons/web_graph/i18n/nl_BE.po
+++ b/addons/web_graph/i18n/nl_BE.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/pl.po b/addons/web_graph/i18n/pl.po
index b76954c3140..1da14fe898b 100644
--- a/addons/web_graph/i18n/pl.po
+++ b/addons/web_graph/i18n/pl.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/pt.po b/addons/web_graph/i18n/pt.po
index b9c952aff16..439b636d0f5 100644
--- a/addons/web_graph/i18n/pt.po
+++ b/addons/web_graph/i18n/pt.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/pt_BR.po b/addons/web_graph/i18n/pt_BR.po
index 9d9cc7cadfd..4b8c685265e 100644
--- a/addons/web_graph/i18n/pt_BR.po
+++ b/addons/web_graph/i18n/pt_BR.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/ro.po b/addons/web_graph/i18n/ro.po
index 0e87c56287d..096eb7399c1 100644
--- a/addons/web_graph/i18n/ro.po
+++ b/addons/web_graph/i18n/ro.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/ru.po b/addons/web_graph/i18n/ru.po
index 7fda09690b6..342854414b5 100644
--- a/addons/web_graph/i18n/ru.po
+++ b/addons/web_graph/i18n/ru.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/sl.po b/addons/web_graph/i18n/sl.po
index 0d752fd9a87..4d19f47f674 100644
--- a/addons/web_graph/i18n/sl.po
+++ b/addons/web_graph/i18n/sl.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/sq.po b/addons/web_graph/i18n/sq.po
index 20acce79f17..4c961ff49d0 100644
--- a/addons/web_graph/i18n/sq.po
+++ b/addons/web_graph/i18n/sq.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/sr@latin.po b/addons/web_graph/i18n/sr@latin.po
index f288a2513bd..956f58e46bc 100644
--- a/addons/web_graph/i18n/sr@latin.po
+++ b/addons/web_graph/i18n/sr@latin.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/sv.po b/addons/web_graph/i18n/sv.po
index 6560d2eb89e..d1a6d343356 100644
--- a/addons/web_graph/i18n/sv.po
+++ b/addons/web_graph/i18n/sv.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/th.po b/addons/web_graph/i18n/th.po
index 451f8ee2ccb..9db95a05d93 100644
--- a/addons/web_graph/i18n/th.po
+++ b/addons/web_graph/i18n/th.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/tr.po b/addons/web_graph/i18n/tr.po
index e47efb1ce9e..0222c3a0db7 100644
--- a/addons/web_graph/i18n/tr.po
+++ b/addons/web_graph/i18n/tr.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/i18n/zh_CN.po b/addons/web_graph/i18n/zh_CN.po
index 1ab893a82fa..9e2e51bc123 100644
--- a/addons/web_graph/i18n/zh_CN.po
+++ b/addons/web_graph/i18n/zh_CN.po
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-18 06:41+0000\n"
+"X-Launchpad-Export-Date: 2014-04-26 06:54+0000\n"
"X-Generator: Launchpad (build 16985)\n"
#. module: web_graph
diff --git a/addons/web_graph/static/src/js/graph_view.js b/addons/web_graph/static/src/js/graph_view.js
index 25a1f932cc4..e4e074b2e7f 100644
--- a/addons/web_graph/static/src/js/graph_view.js
+++ b/addons/web_graph/static/src/js/graph_view.js
@@ -167,7 +167,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
row_search_facet = query.findWhere({category:'GroupBy'});
if (row_search_facet) {
- row_search_facet.values.reset(row_facet.values);
+ row_search_facet.values.reset(row_facet.values, {focus_input:false});
} else {
if (row_groupby.length) {
query.add(row_facet);
@@ -181,7 +181,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
col_search_facet = query.findWhere({category:'ColGroupBy'});
if (col_search_facet) {
- col_search_facet.values.reset(col_facet.values);
+ col_search_facet.values.reset(col_facet.values, {focus_input:false});
} else {
if (col_groupby.length) {
query.add(col_facet);
diff --git a/addons/web_graph/static/src/js/graph_widget.js b/addons/web_graph/static/src/js/graph_widget.js
index 317ea6cbfb9..9946e149d96 100644
--- a/addons/web_graph/static/src/js/graph_widget.js
+++ b/addons/web_graph/static/src/js/graph_widget.js
@@ -43,8 +43,15 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
this.$('.graph_main_content').addClass('graph_pivot_mode');
}
+ // get search view
+ var parent = this.getParent();
+ while (!(parent instanceof openerp.web.ViewManager)) {
+ parent = parent.getParent();
+ }
+ this.search_view = parent.searchview;
+
openerp.session.rpc('/web_graph/check_xlwt').then(function (result) {
- self.$('.graph_options_selection label').toggle(result);
+ self.$('.graph_options_selection label').last().toggle(result);
});
return this.model.call('fields_get', []).then(function (f) {
@@ -76,16 +83,9 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
// this method gets the fields that appear in the search view, under the
// 'Groupby' heading
get_search_fields: function () {
- var self = this,
- parent = this.getParent();
-
- while (!(parent instanceof openerp.web.ViewManager)) {
- parent = parent.getParent();
- }
-
- var search_view = parent.searchview;
+ var self = this;
- var groupbygroups = _(search_view.inputs).select(function (g) {
+ var groupbygroups = _(this.search_view.inputs).select(function (g) {
return g instanceof openerp.web.search.GroupbyGroup;
});
@@ -260,21 +260,12 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
option_selection: function (event) {
event.preventDefault();
switch (event.currentTarget.getAttribute('data-choice')) {
- case 'bar_grouped':
- this.bar_ui = 'group';
- if (this.mode === 'bar') {
- this.display_data();
- }
- break;
- case 'bar_stacked':
- this.bar_ui = 'stack';
- if (this.mode === 'bar') {
- this.display_data();
- }
- break;
case 'swap_axis':
this.swap_axis();
break;
+ case 'expand_all':
+ this.pivot.expand_all().then(this.proxy('display_data'));
+ break;
case 'update_values':
this.pivot.update_data().then(this.proxy('display_data'));
break;
@@ -305,11 +296,11 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
if (header.expanded) {
this.fold(header);
return;
- }
+ }
if (header.path.length < header.root.groupby.length) {
this.expand(id);
return;
- }
+ }
if (!this.important_fields.length) {
return;
}
@@ -453,55 +444,67 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
build_rows: function (raw) {
var self = this,
pivot = this.pivot,
- m, i, cell;
-
- return _.map(pivot.rows.headers, function (row) {
- var cells = [];
- var pivot_cells = [];
- for (i = 0; i < pivot.cells.length; i++) {
- if (pivot.cells[i].x == row.id || pivot.cells[i].y == row.id) {
- pivot_cells.push(pivot.cells[i]);
- }
+ m, i, j, k, cell, row;
+
+ var rows = [];
+ var cells, pivot_cells, values;
+
+ var nbr_of_rows = pivot.rows.headers.length;
+ var col_headers = pivot.get_cols_leaves();
+
+ for (i = 0; i < nbr_of_rows; i++) {
+ row = pivot.rows.headers[i];
+ cells = [];
+ pivot_cells = [];
+ for (j = 0; j < pivot.cells.length; j++) {
+ if (pivot.cells[j].x == row.id || pivot.cells[j].y == row.id) {
+ pivot_cells.push(pivot.cells[j]);
+ }
}
- _.each(pivot.get_cols_leaves(), function (col) {
- var values;
- for (i = 0; i < pivot_cells.length; i++) {
- if (pivot_cells[i].x == col.id || pivot_cells[i].y == col.id) {
- values = pivot_cells[i].values;
+
+ for (j = 0; j < col_headers.length; j++) {
+ values = undefined;
+ for (k = 0; k < pivot_cells.length; k++) {
+ if (pivot_cells[k].x == col_headers[j].id || pivot_cells[k].y == col_headers[j].id) {
+ values = pivot_cells[k].values;
break;
- }
+ }
}
if (!values) { values = new Array(pivot.measures.length);}
for (m = 0; m < pivot.measures.length; m++) {
- cells.push(self.make_cell(row,col,values[m], m, raw));
+ cells.push(self.make_cell(row,col_headers[j],values[m], m, raw));
}
- });
- if (pivot.get_cols_leaves().length > 1) {
+ }
+ if (col_headers.length > 1) {
var totals = pivot.get_total(row);
for (m = 0; m < pivot.measures.length; m++) {
- cell = self.make_cell(row, pivot.main_col(), totals[m], m, raw);
+ cell = self.make_cell(row, pivot.cols.headers[0], totals[m], m, raw);
cell.is_bold = 'true';
cells.push(cell);
}
}
- return {
+ rows.push({
id: row.id,
indent: row.path.length,
title: row.title,
expanded: row.expanded,
cells: cells,
- };
- });
+ });
+ }
+
+ return rows;
},
// ----------------------------------------------------------------------
// Main display method
// ----------------------------------------------------------------------
display_data: function () {
+ var scroll = $(window).scrollTop();
this.$('.graph_main_content svg').remove();
this.$('.graph_main_content div').remove();
this.table.empty();
this.table.toggleClass('heatmap', this.heatmap_mode !== 'none');
+ this.$('.graph_options_selection label').last().toggleClass('disabled', this.pivot.no_data);
this.width = this.$el.width();
this.height = Math.min(Math.max(document.documentElement.clientHeight - 116 - 60, 250), Math.round(0.8*this.$el.width()));
@@ -511,6 +514,7 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
} else {
if (this.mode === 'pivot') {
this.draw_table();
+ $(window).scrollTop(scroll);
} else {
this.$('.graph_main_content').append($('<div><svg>'));
this.svg = this.$('.graph_main_content svg')[0];
@@ -524,9 +528,11 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
// ----------------------------------------------------------------------
draw_table: function () {
var table = this.build_table();
- this.draw_headers(table.headers);
- this.draw_measure_row(table.measure_row);
- this.draw_rows(table.rows);
+ var doc_fragment = $(document.createDocumentFragment());
+ this.draw_headers(table.headers, doc_fragment);
+ this.draw_measure_row(table.measure_row, doc_fragment);
+ this.draw_rows(table.rows, doc_fragment);
+ this.table.append(doc_fragment);
},
make_header_cell: function (header) {
@@ -549,7 +555,7 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
return cell.append(content);
},
- draw_headers: function (headers) {
+ draw_headers: function (headers, doc_fragment) {
var make_cell = this.make_header_cell,
empty_cell = $('<th>').attr('rowspan', headers.length),
thead = $('<thead>');
@@ -562,10 +568,11 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
thead.append(html_row);
});
thead.children(':first').prepend(empty_cell);
- this.table.append(thead);
+ doc_fragment.append(thead);
+ this.thead = thead;
},
- draw_measure_row: function (measure_row) {
+ draw_measure_row: function (measure_row, doc_fragment) {
if (this.pivot.measures.length === 1) { return; }
var html_row = $('<tr>').append('<th>');
_.each(measure_row, function (cell) {
@@ -573,25 +580,39 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
if (cell.is_bold) {measure_cell.css('font-weight', 'bold');}
html_row.append(measure_cell);
});
- this.$('thead').append(html_row);
+ this.thead.append(html_row);
},
- draw_rows: function (rows) {
- var table = this.table,
- make_cell = this.make_header_cell;
-
- _.each(rows, function (row) {
- var html_row = $('<tr>').append(make_cell(row));
- _.each(row.cells, function (cell) {
- var html_cell = $('<td>').text(cell.value);
- if (_.has(cell, 'color')) {
- html_cell.css('background-color', $.Color(255, cell.color, cell.color));
+ draw_rows: function (rows, doc_fragment) {
+ var make_cell = this.make_header_cell,
+ cell,
+ html_row, i, j;
+
+ var cells_list,
+ hcell,
+ rows_length, cells_length;
+
+ rows_length = rows.length;
+ for (i = 0; i < rows_length; i++) {
+ html_row = $('<tr>').append(make_cell(rows[i]));
+ cells_length = rows[i].cells.length;
+ cells_list = [];
+
+ for (j = 0; j < cells_length; j++) {
+ cell = rows[i].cells[j];
+ hcell = '<td';
+ if (cell.is_bold || cell.color) {
+ hcell += ' style="';
+ if (cell.is_bold) hcell += 'font-weight: bold;';
+ if (cell.color) hcell += 'background-color:' + $.Color(255, cell.color, cell.color) + ';';
+ hcell += '"';
}
- if (cell.is_bold) { html_cell.css('font-weight', 'bold'); }
- html_row.append(html_cell);
- });
- table.append(html_row);
- });
+ hcell += '>' + cell.value + '</td>';
+ cells_list[j] = hcell;
+ }
+ html_row.append(cells_list.join(''));
+ doc_fragment.append($('<tbody>').append(html_row));
+ }
},
// ----------------------------------------------------------------------
@@ -608,7 +629,7 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
if ((dim_x === 0) && (dim_y === 0)) {
data = [{key: _t('Total'), values:[{
x: _t('Total'),
- y: this.pivot.get_total(),
+ y: this.pivot.get_total()[0],
}]}];
// Only column groupbys
} else if ((dim_x === 0) && (dim_y >= 1)){
@@ -621,7 +642,7 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
// Just 1 row groupby
} else if ((dim_x === 1) && (dim_y === 0)) {
data = _.map(this.pivot.main_row().children, function (pt) {
- var value = self.pivot.get_total(pt),
+ var value = self.pivot.get_total(pt)[0],
title = (pt.title !== undefined) ? pt.title : _t('Undefined');
return {x: title, y: value};
});
@@ -658,8 +679,6 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
nv.addGraph(function () {
var chart = nv.models.multiBarChart()
- .width(self.width)
- .height(self.height)
.reduceXTicks(false)
.stacked(self.bar_ui === 'stack')
.showControls(show_controls);
@@ -687,9 +706,12 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
dim_x = this.pivot.rows.groupby.length,
dim_y = this.pivot.cols.groupby.length;
+ var rows = this.pivot.get_rows_with_depth(dim_x),
+ labels = _.pluck(rows, 'title');
+
var data = _.map(this.pivot.get_cols_leaves(), function (col) {
- var values = _.map(self.pivot.get_rows_with_depth(dim_x), function (row) {
- return {x: row.title, y: self.pivot.get_values(row.id,col.id)[0] || 0};
+ var values = _.map(rows, function (row, index) {
+ return {x: index, y: self.pivot.get_values(row.id,col.id)[0] || 0};
});
var title = _.map(col.path, function (p) {
return p || _t('Undefined');
@@ -702,10 +724,9 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
nv.addGraph(function () {
var chart = nv.models.lineChart()
- .x(function (d,u) { return u; })
- .width(self.width)
- .height(self.height)
- .margin({top: 30, right: 20, bottom: 20, left: 60});
+ .x(function (d,u) { return u; });
+
+ chart.xAxis.tickFormat(function (d,u) {return labels[d];});
d3.select(self.svg)
.attr('width', self.width)
@@ -727,14 +748,14 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
if (dim_x === 0) {
title = self.measure_label;
}
- return {x: title, y: self.pivot.get_total(row)};
+ return {x: title, y: self.pivot.get_total(row)[0]};
});
nv.addGraph(function () {
var chart = nv.models.pieChart()
- .color(d3.scale.category10().range())
.width(self.width)
- .height(self.height);
+ .height(self.height)
+ .color(d3.scale.category10().range());
d3.select(self.svg)
.datum(data)
diff --git a/addons/web_graph/static/src/js/pivot_table.js b/addons/web_graph/static/src/js/pivot_table.js
index 6b12829982e..48ae9ec3830 100644
--- a/addons/web_graph/static/src/js/pivot_table.js
+++ b/addons/web_graph/static/src/js/pivot_table.js
@@ -14,6 +14,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({
this.cells = [];
this.domain = domain;
this.no_data = true;
+ this.updating = false;
this.model = model;
this.fields = fields;
this.fields.__count = {type: 'integer', string:_t('Quantity')};
@@ -55,6 +56,13 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({
},
set: function (domain, row_groupby, col_groupby) {
+ var self = this;
+ if (this.updating) {
+ return this.updating.then(function () {
+ self.updating = false;
+ return self.set(domain, row_groupby,col_groupby);
+ });
+ }
var row_gb_changed = !_.isEqual(row_groupby, this.rows.groupby),
col_gb_changed = !_.isEqual(col_groupby, this.cols.groupby);
@@ -251,7 +259,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({
// to null before calling update_data.
update_data: function () {
var self = this;
- return this.perform_requests().then (function () {
+ this.updating = this.perform_requests().then (function () {
var data = Array.prototype.slice.call(arguments);
self.no_data = !data[0].length;
if (self.no_data) {
@@ -273,6 +281,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({
self.set_headers(row_headers, self.rows);
self.set_headers(col_headers, self.cols);
});
+ return this.updating;
},
make_headers_and_cell: function (data_pts, row_headers, col_headers, index, prefix, expand) {
diff --git a/addons/web_graph/static/src/xml/web_graph.xml b/addons/web_graph/static/src/xml/web_graph.xml
index 4522fd2504f..81804e5a9b1 100644
--- a/addons/web_graph/static/src/xml/web_graph.xml
+++ b/addons/web_graph/static/src/xml/web_graph.xml
@@ -35,6 +35,9 @@
<label class="btn btn-default" data-choice="swap_axis" title="Swap Axis">
<span class="fa fa-expand"></span>
</label>
+ <label class="btn btn-default" data-choice="expand_all" title="Expand All">
+ <span class="fa fa-arrows-alt"></span>
+ </label>
<label class="btn btn-default" data-choice="update_values" title="Reload Data">
<span class="fa fa-refresh"></span>
</label>
diff --git a/addons/web_graph/views/web_graph.xml b/addons/web_graph/views/web_graph.xml
new file mode 100644
index 00000000000..e7e595dffd7
--- /dev/null
+++ b/addons/web_graph/views/web_graph.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- vim:fdn=3:
+-->
+<openerp>
+ <data>
+ <template id="assets_backend" name="web_graph assets" inherit_id="web.assets_backend">
+ <xpath expr="." position="inside">
+ <link rel="stylesheet" href="/web_graph/static/src/css/graph.css"/>
+ <link rel="stylesheet" href="/web_graph/static/src/css/nv.d3.css"/>
+
+ <script type="text/javascript" src="/web_graph/static/lib/nvd3/d3.v3.js"></script>
+ <script type="text/javascript" src="/web_graph/static/lib/nvd3/nv.d3.js"></script>
+ <script type="text/javascript" src="/web_graph/static/src/js/graph_view.js"></script>
+ <script type="text/javascript" src="/web_graph/static/src/js/pivot_table.js"></script>
+ <script type="text/javascript" src="/web_graph/static/src/js/graph_widget.js"></script>
+ </xpath>
+ </template>
+ </data>
+</openerp>