Merge lp:~openerp-community/web-addons/7.0-web_export_view_CSV into lp:~webaddons-core-editors/web-addons/7.0

Proposed by Lorenzo Battistini
Status: Work in progress
Proposed branch: lp:~openerp-community/web-addons/7.0-web_export_view_CSV
Merge into: lp:~webaddons-core-editors/web-addons/7.0
Prerequisite: lp:~domsense/web-addons/7.0-web_export_view
Diff against target: 59 lines (+9/-9)
3 files modified
web_export_view/controllers.py (+5/-5)
web_export_view/static/js/web_advanced_export.js (+3/-3)
web_export_view/static/xml/web_advanced_export.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-community/web-addons/7.0-web_export_view_CSV
Reviewer Review Type Date Requested Status
Nhomar - Vauxoo Needs Information
Review via email: mp+178577@code.launchpad.net

Description of the change

[REF] Exporting as CSV instead of XLS.
See https://bugs.launchpad.net/web-addons/+bug/1046342/comments/2

To post a comment you must log in.
Revision history for this message
Nhomar - Vauxoo (nhomar) wrote :

Lorenzo.

Why not have both controllers?

I merged already excel ones, and i think if we have both it is better (I hate excel, but everybody love it :-()

review: Needs Information
Revision history for this message
Eric Caudal - www.elico-corp.com (elicoidal) wrote :

I had an issue starting the addons. Shouldnot it be in controllers.py:
import openerp.addons.web.http as openerpweb

from openerp.addons.web.controllers.main import ExcelExport

Eric CAUDAL

Eric Caudal
On 01/09/2013 13:57, Nhomar - Vauxoo wrote:

> Review: Needs Information
>
> Lorenzo.
>
> Why not have both controllers?
>
> I merged already excel ones, and i think if we have both it is better (I hate excel, but everybody love it :-()

Revision history for this message
Nhomar - Vauxoo (nhomar) wrote :

Eric,

I think this branch is marked as WIP it is not ready yet I think.

Revision history for this message
Eric Caudal - www.elico-corp.com (elicoidal) wrote :

OK: I tested it and so far so good anyway
Eric CAUDAL

Eric CaudalOn 01/09/2013 15:36, Nhomar - Vauxoo wrote:

> Eric,
>
> I think this branch is marked as WIP it is not ready yet I think.

Revision history for this message
Lorenzo Battistini (elbati) wrote :

On 09/01/2013 07:57 AM, Nhomar - Vauxoo wrote:
> Lorenzo.
>
> Why not have both controllers?

This would be good.
But we can't work on it now.
I'm changing the branch owner so that everybody can improve it.

Unmerged revisions

10. By Lorenzo Battistini

[REF] Exporting as CSV instead of XLS.
See https://bugs.launchpad.net/web-addons/+bug/1046342/comments/2

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'web_export_view/controllers.py'
--- web_export_view/controllers.py 2013-08-05 14:42:26 +0000
+++ web_export_view/controllers.py 2013-08-05 14:42:26 +0000
@@ -25,11 +25,11 @@
2525
26import web.http as openerpweb26import web.http as openerpweb
2727
28from web.controllers.main import ExcelExport28from web.controllers.main import CSVExport
2929
3030
31class ExcelExportView(ExcelExport):31class CSVExportView(CSVExport):
32 _cp_path = '/web/export/xls_view'32 _cp_path = '/web/export/csv_view'
3333
34 @openerpweb.httprequest34 @openerpweb.httprequest
35 def index(self, req, data, token):35 def index(self, req, data, token):
3636
=== modified file 'web_export_view/static/js/web_advanced_export.js'
--- web_export_view/static/js/web_advanced_export.js 2013-08-05 14:42:26 +0000
+++ web_export_view/static/js/web_advanced_export.js 2013-08-05 14:42:26 +0000
@@ -29,10 +29,10 @@
29 var self = this;29 var self = this;
30 this._super.apply(this, arguments);30 this._super.apply(this, arguments);
31 self.$el.find('.oe_sidebar').append(QWeb.render('AddExportViewMain', {widget: self}));31 self.$el.find('.oe_sidebar').append(QWeb.render('AddExportViewMain', {widget: self}));
32 self.$el.find('.oe_sidebar_export_view_xls').on('click', self.on_sidebar_export_view_xls);32 self.$el.find('.oe_sidebar_export_view_csv').on('click', self.on_sidebar_export_view_csv);
33 },33 },
3434
35 on_sidebar_export_view_xls: function() {35 on_sidebar_export_view_csv: function() {
36 // Select the first list of the current (form) view36 // Select the first list of the current (form) view
37 // or assume the main view is a list view and use that37 // or assume the main view is a list view and use that
38 var self = this,38 var self = this,
@@ -80,7 +80,7 @@
80 });80 });
81 $.blockUI();81 $.blockUI();
82 view.session.get_file({82 view.session.get_file({
83 url: '/web/export/xls_view',83 url: '/web/export/csv_view',
84 data: {data: JSON.stringify({84 data: {data: JSON.stringify({
85 model : view.model,85 model : view.model,
86 headers : export_columns_names,86 headers : export_columns_names,
8787
=== modified file 'web_export_view/static/xml/web_advanced_export.xml'
--- web_export_view/static/xml/web_advanced_export.xml 2013-08-05 14:42:26 +0000
+++ web_export_view/static/xml/web_advanced_export.xml 2013-08-05 14:42:26 +0000
@@ -6,7 +6,7 @@
6 <div class="oe_form_dropdown_section">6 <div class="oe_form_dropdown_section">
7 <button class="oe_dropdown_toggle oe_dropdown_arrow">Export Current View</button>7 <button class="oe_dropdown_toggle oe_dropdown_arrow">Export Current View</button>
8 <ul class="oe_dropdown_menu">8 <ul class="oe_dropdown_menu">
9 <li class="oe_sidebar_export_view_xls"><span>Excel</span></li>9 <li class="oe_sidebar_export_view_csv"><span>CSV</span></li>
10 </ul>10 </ul>
11 </div>11 </div>
12</t>12</t>

Subscribers

People subscribed via source and target branches