Merge lp:~openerp-dev/openerp-web/trunk-bug-900385-kch into lp:openerp-web

Proposed by Kunal Chavda
Status: Rejected
Rejected by: Xavier (Open ERP)
Proposed branch: lp:~openerp-dev/openerp-web/trunk-bug-900385-kch
Merge into: lp:openerp-web
Diff against target: 18 lines (+2/-1)
1 file modified
addons/web/static/src/js/data_export.js (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/trunk-bug-900385-kch
Reviewer Review Type Date Requested Status
Antony Lesuisse (OpenERP) Needs Fixing
Xavier (Open ERP) (community) Approve
Review via email: mp+93340@code.launchpad.net

Description of the change

Hello,
I have coded for export if selected record in list view and current open record in form view.
If in list view not selected any record than it will export all record which is currently happen not limited by pagination.

Thanks,
KCH

To post a comment you must log in.
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) :
review: Approve
Revision history for this message
Antony Lesuisse (OpenERP) (al-openerp) wrote :

In the new ui the export option is only available if you select one or more record.
I think we should display a <select> in the export popup with 2 options:
-export only selected records
-export all search matching records
If we decide not to display this option only the second option (current behaviour) should be implemented.

Gmail does it a the selection time (before the popup) but i dont think it will be easy to implement without loading all the matching ids in the browser (something i would like to avoid).

review: Needs Fixing

Unmerged revisions

2218. By Kunal Chavda

[IMP]export only selected fields from list view and current open record in form view.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/data_export.js'
2--- addons/web/static/src/js/data_export.js 2012-01-17 08:58:12 +0000
3+++ addons/web/static/src/js/data_export.js 2012-02-16 06:52:19 +0000
4@@ -377,12 +377,13 @@
5 exported_fields.unshift({name: 'id', label: 'External ID'});
6 var export_format = this.$element.find("#export_format").val();
7 $.blockUI();
8+
9 this.session.get_file({
10 url: '/web/export/' + export_format,
11 data: {data: JSON.stringify({
12 model: this.dataset.model,
13 fields: exported_fields,
14- ids: this.dataset.ids,
15+ ids: this.widget_parent.get_selected_ids(),
16 domain: this.dataset.domain,
17 import_compat: Boolean(
18 this.$element.find("#import_compat").val())