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 on 2013-08-05
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 2013-08-05 Needs Information on 2013-09-01
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.
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

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 :-()

Nhomar - Vauxoo (nhomar) wrote :

Eric,

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

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.

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 on 2013-08-05

[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
1=== modified file 'web_export_view/controllers.py'
2--- web_export_view/controllers.py 2013-08-05 14:42:26 +0000
3+++ web_export_view/controllers.py 2013-08-05 14:42:26 +0000
4@@ -25,11 +25,11 @@
5
6 import web.http as openerpweb
7
8-from web.controllers.main import ExcelExport
9-
10-
11-class ExcelExportView(ExcelExport):
12- _cp_path = '/web/export/xls_view'
13+from web.controllers.main import CSVExport
14+
15+
16+class CSVExportView(CSVExport):
17+ _cp_path = '/web/export/csv_view'
18
19 @openerpweb.httprequest
20 def index(self, req, data, token):
21
22=== modified file 'web_export_view/static/js/web_advanced_export.js'
23--- web_export_view/static/js/web_advanced_export.js 2013-08-05 14:42:26 +0000
24+++ web_export_view/static/js/web_advanced_export.js 2013-08-05 14:42:26 +0000
25@@ -29,10 +29,10 @@
26 var self = this;
27 this._super.apply(this, arguments);
28 self.$el.find('.oe_sidebar').append(QWeb.render('AddExportViewMain', {widget: self}));
29- self.$el.find('.oe_sidebar_export_view_xls').on('click', self.on_sidebar_export_view_xls);
30+ self.$el.find('.oe_sidebar_export_view_csv').on('click', self.on_sidebar_export_view_csv);
31 },
32
33- on_sidebar_export_view_xls: function() {
34+ on_sidebar_export_view_csv: function() {
35 // Select the first list of the current (form) view
36 // or assume the main view is a list view and use that
37 var self = this,
38@@ -80,7 +80,7 @@
39 });
40 $.blockUI();
41 view.session.get_file({
42- url: '/web/export/xls_view',
43+ url: '/web/export/csv_view',
44 data: {data: JSON.stringify({
45 model : view.model,
46 headers : export_columns_names,
47
48=== modified file 'web_export_view/static/xml/web_advanced_export.xml'
49--- web_export_view/static/xml/web_advanced_export.xml 2013-08-05 14:42:26 +0000
50+++ web_export_view/static/xml/web_advanced_export.xml 2013-08-05 14:42:26 +0000
51@@ -6,7 +6,7 @@
52 <div class="oe_form_dropdown_section">
53 <button class="oe_dropdown_toggle oe_dropdown_arrow">Export Current View</button>
54 <ul class="oe_dropdown_menu">
55- <li class="oe_sidebar_export_view_xls"><span>Excel</span></li>
56+ <li class="oe_sidebar_export_view_csv"><span>CSV</span></li>
57 </ul>
58 </div>
59 </t>

Subscribers

People subscribed via source and target branches