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
1=== modified file 'addons/openerp/controllers/impex.py'
2--- addons/openerp/controllers/impex.py 2012-03-06 17:27:34 +0000
3+++ addons/openerp/controllers/impex.py 2012-03-09 09:14:18 +0000
4@@ -117,7 +117,15 @@
5 for i, view in enumerate(params.view_mode):
6 views[view] = params.view_ids[i]
7
8-
9+<<<<<<< TREE
10+
11+=======
12+ export_format = data.get('export_format', 'excel')
13+ all_records = data.get('all_records', '0')
14+
15+ if not params.ids:
16+ all_records = '1'
17+>>>>>>> MERGE-SOURCE
18 exports = rpc.RPCProxy('ir.exports')
19
20 headers = [{'string' : 'Name', 'name' : 'name', 'type' : 'char'}]
21@@ -138,7 +146,11 @@
22
23 return dict(existing_exports=existing_exports, model=params.model, ids=params.ids, ctx=ctx,
24 search_domain=params.search_domain, source=params.source,
25+<<<<<<< TREE
26 tree=tree, import_compat=import_compat)
27+=======
28+ tree=tree, import_compat=import_compat, default=default, export_format=export_format, all_records=all_records)
29+>>>>>>> MERGE-SOURCE
30
31 @expose()
32 def save_exp(self, **kw):
33@@ -353,7 +365,11 @@
34 return rec(fields)
35
36 @expose(content_type="application/octet-stream")
37+<<<<<<< TREE
38 def export_data(self, fname, fields, import_compat=False, **kw):
39+=======
40+ def export_data(self, fname, fields, import_compat=False, export_format='csv', all_records=False, **kw):
41+>>>>>>> MERGE-SOURCE
42
43 params, data_index = TinyDict.split(kw)
44 proxy = rpc.RPCProxy(params.model)
45@@ -371,9 +387,17 @@
46 ctx = dict((params.context or {}), **rpc.session.context)
47 ctx['import_comp'] = bool(int(import_compat))
48
49+<<<<<<< TREE
50 domain = params.seach_domain or []
51+=======
52+ view_name = ctx.get('_terp_view_name', '')
53+>>>>>>> MERGE-SOURCE
54
55- ids = params.ids or proxy.search(domain, 0, 0, 0, ctx)
56+ if not params.ids or all_records:
57+ domain = params.search_domain or []
58+ ids = proxy.search(domain, 0, 2000, 0, ctx)
59+ else:
60+ ids = params.ids or []
61 result = datas_read(ids, params.model, flds, context=ctx)
62
63 if result.get('warning'):
64
65=== modified file 'addons/openerp/controllers/templates/exp.mako'
66--- addons/openerp/controllers/templates/exp.mako 2012-03-06 17:27:34 +0000
67+++ addons/openerp/controllers/templates/exp.mako 2012-03-09 09:14:18 +0000
68@@ -172,6 +172,25 @@
69 >${_("Export all Data")}</option>
70 </select>
71 </td>
72+<<<<<<< TREE
73+=======
74+ <td class="label"><label for="export_format">${_("Format:")}</label></td>
75+ <td>
76+ <select id="export_format" name="export_format">
77+ <option value="excel" style="padding-right: 15px;">${_("Excel")}</option>
78+ <option value="csv" ${'selected=selected' if export_format == "csv" else ''}>${_("CSV")}</option>
79+ </select>
80+ </td>
81+ <td class="label">
82+ <label for="all_records">Export all query results (limited to 2000 records):</label>
83+ </td>
84+ <td>
85+ <input type="checkbox" id="all_records" name="all_records" value="1"
86+ ${'checked=checked' if all_records=='1' else ''}
87+ ${'disabled=disabled' if not ids else ''}
88+ />
89+ </td>
90+>>>>>>> MERGE-SOURCE
91 </tr>
92 </table>
93 </td>
94
95=== modified file 'addons/openerp/static/javascript/listgrid.js'
96--- addons/openerp/static/javascript/listgrid.js 2012-03-06 17:27:34 +0000
97+++ addons/openerp/static/javascript/listgrid.js 2012-03-09 09:14:18 +0000
98@@ -231,6 +231,23 @@
99 }
100 },
101
102+<<<<<<< TREE
103+=======
104+
105+ expand_all_group: function(pid) {
106+ if (!pid) {
107+ elem = jQuery('#'+this.name+'_grid')
108+ } else {
109+ elem = jQuery('tr[parent="' + pid + '"]');
110+ }
111+ this.expand_all = 1;
112+ elem.find('td.group-expand').each(function() {
113+ jQuery(this).click();
114+ });
115+ this.expand_all = 0;
116+ $('#expand_all').hide();
117+ },
118+>>>>>>> MERGE-SOURCE
119 group_by: function(id, record, no_leaf, group) {
120 var $group_record = jQuery('[records="' + record + '"]');
121 var group_by_context = $group_record.attr('grp_context');

Subscribers

People subscribed via source and target branches

to all changes: