Merge lp:~unifield-team/unifield-web/web_uf_852 into lp:unifield-web

Proposed by jftempo
Status: Merged
Merge reported by: jftempo
Merged at revision: not available
Proposed branch: lp:~unifield-team/unifield-web/web_uf_852
Merge into: lp:unifield-web
Diff against target: 121 lines (+62/-2) (has conflicts)
3 files modified
addons/openerp/controllers/impex.py (+26/-2)
addons/openerp/controllers/templates/exp.mako (+19/-0)
addons/openerp/static/javascript/listgrid.js (+17/-0)
Text conflict in addons/openerp/controllers/impex.py
Text conflict in addons/openerp/controllers/templates/exp.mako
Text conflict in addons/openerp/static/javascript/listgrid.js
To merge this branch: bzr merge lp:~unifield-team/unifield-web/web_uf_852
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+96730@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/openerp/controllers/impex.py'
--- addons/openerp/controllers/impex.py 2012-03-06 17:27:34 +0000
+++ addons/openerp/controllers/impex.py 2012-03-09 09:14:18 +0000
@@ -117,7 +117,15 @@
117 for i, view in enumerate(params.view_mode):117 for i, view in enumerate(params.view_mode):
118 views[view] = params.view_ids[i]118 views[view] = params.view_ids[i]
119119
120120<<<<<<< TREE
121
122=======
123 export_format = data.get('export_format', 'excel')
124 all_records = data.get('all_records', '0')
125
126 if not params.ids:
127 all_records = '1'
128>>>>>>> MERGE-SOURCE
121 exports = rpc.RPCProxy('ir.exports')129 exports = rpc.RPCProxy('ir.exports')
122130
123 headers = [{'string' : 'Name', 'name' : 'name', 'type' : 'char'}]131 headers = [{'string' : 'Name', 'name' : 'name', 'type' : 'char'}]
@@ -138,7 +146,11 @@
138146
139 return dict(existing_exports=existing_exports, model=params.model, ids=params.ids, ctx=ctx,147 return dict(existing_exports=existing_exports, model=params.model, ids=params.ids, ctx=ctx,
140 search_domain=params.search_domain, source=params.source,148 search_domain=params.search_domain, source=params.source,
149<<<<<<< TREE
141 tree=tree, import_compat=import_compat)150 tree=tree, import_compat=import_compat)
151=======
152 tree=tree, import_compat=import_compat, default=default, export_format=export_format, all_records=all_records)
153>>>>>>> MERGE-SOURCE
142154
143 @expose()155 @expose()
144 def save_exp(self, **kw):156 def save_exp(self, **kw):
@@ -353,7 +365,11 @@
353 return rec(fields)365 return rec(fields)
354366
355 @expose(content_type="application/octet-stream")367 @expose(content_type="application/octet-stream")
368<<<<<<< TREE
356 def export_data(self, fname, fields, import_compat=False, **kw):369 def export_data(self, fname, fields, import_compat=False, **kw):
370=======
371 def export_data(self, fname, fields, import_compat=False, export_format='csv', all_records=False, **kw):
372>>>>>>> MERGE-SOURCE
357373
358 params, data_index = TinyDict.split(kw)374 params, data_index = TinyDict.split(kw)
359 proxy = rpc.RPCProxy(params.model)375 proxy = rpc.RPCProxy(params.model)
@@ -371,9 +387,17 @@
371 ctx = dict((params.context or {}), **rpc.session.context)387 ctx = dict((params.context or {}), **rpc.session.context)
372 ctx['import_comp'] = bool(int(import_compat))388 ctx['import_comp'] = bool(int(import_compat))
373389
390<<<<<<< TREE
374 domain = params.seach_domain or []391 domain = params.seach_domain or []
392=======
393 view_name = ctx.get('_terp_view_name', '')
394>>>>>>> MERGE-SOURCE
375395
376 ids = params.ids or proxy.search(domain, 0, 0, 0, ctx)396 if not params.ids or all_records:
397 domain = params.search_domain or []
398 ids = proxy.search(domain, 0, 2000, 0, ctx)
399 else:
400 ids = params.ids or []
377 result = datas_read(ids, params.model, flds, context=ctx)401 result = datas_read(ids, params.model, flds, context=ctx)
378402
379 if result.get('warning'):403 if result.get('warning'):
380404
=== modified file 'addons/openerp/controllers/templates/exp.mako'
--- addons/openerp/controllers/templates/exp.mako 2012-03-06 17:27:34 +0000
+++ addons/openerp/controllers/templates/exp.mako 2012-03-09 09:14:18 +0000
@@ -172,6 +172,25 @@
172 >${_("Export all Data")}</option>172 >${_("Export all Data")}</option>
173 </select>173 </select>
174 </td>174 </td>
175<<<<<<< TREE
176=======
177 <td class="label"><label for="export_format">${_("Format:")}</label></td>
178 <td>
179 <select id="export_format" name="export_format">
180 <option value="excel" style="padding-right: 15px;">${_("Excel")}</option>
181 <option value="csv" ${'selected=selected' if export_format == "csv" else ''}>${_("CSV")}</option>
182 </select>
183 </td>
184 <td class="label">
185 <label for="all_records">Export all query results (limited to 2000 records):</label>
186 </td>
187 <td>
188 <input type="checkbox" id="all_records" name="all_records" value="1"
189 ${'checked=checked' if all_records=='1' else ''}
190 ${'disabled=disabled' if not ids else ''}
191 />
192 </td>
193>>>>>>> MERGE-SOURCE
175 </tr>194 </tr>
176 </table>195 </table>
177 </td>196 </td>
178197
=== modified file 'addons/openerp/static/javascript/listgrid.js'
--- addons/openerp/static/javascript/listgrid.js 2012-03-06 17:27:34 +0000
+++ addons/openerp/static/javascript/listgrid.js 2012-03-09 09:14:18 +0000
@@ -231,6 +231,23 @@
231 }231 }
232 },232 },
233233
234<<<<<<< TREE
235=======
236
237 expand_all_group: function(pid) {
238 if (!pid) {
239 elem = jQuery('#'+this.name+'_grid')
240 } else {
241 elem = jQuery('tr[parent="' + pid + '"]');
242 }
243 this.expand_all = 1;
244 elem.find('td.group-expand').each(function() {
245 jQuery(this).click();
246 });
247 this.expand_all = 0;
248 $('#expand_all').hide();
249 },
250>>>>>>> MERGE-SOURCE
234 group_by: function(id, record, no_leaf, group) {251 group_by: function(id, record, no_leaf, group) {
235 var $group_record = jQuery('[records="' + record + '"]');252 var $group_record = jQuery('[records="' + record + '"]');
236 var group_by_context = $group_record.attr('grp_context');253 var group_by_context = $group_record.attr('grp_context');

Subscribers

People subscribed via source and target branches

to all changes: