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

Proposed by jftempo
Status: Merged
Merged at revision: 4669
Proposed branch: lp:~unifield-team/unifield-web/UF_1257
Merge into: lp:unifield-web
Diff against target: 46 lines (+16/-1)
2 files modified
addons/openerp/controllers/impex.py (+12/-1)
addons/openerp/controllers/templates/exp.mako (+4/-0)
To merge this branch: bzr merge lp:~unifield-team/unifield-web/UF_1257
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+124675@code.launchpad.net
To post a comment you must log in.
4669. By Olivier DOSSMANN <olivier@tempo-laptop>

UF-1257 [ADD] Do not display Real Stock and Virtual Stock for export

4670. By Olivier DOSSMANN <olivier@tempo-laptop>

UF-1257 [ADD] Only use Code, Description and UoM for product's export (CSV/Excel)

4671. By Olivier DOSSMANN <olivier@tempo-laptop>

UF-1257 [MERGE] Last unifield-web trunk lp:unifield-web

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-09 09:29:10 +0000
3+++ addons/openerp/controllers/impex.py 2012-10-03 12:37:22 +0000
4@@ -388,6 +388,14 @@
5 fields = fields.replace('/.id','.id')
6 flds = [fields]
7
8+ # UF-1257 Only use Code, Description and UoM for export due to timeout error from products with some fields:
9+ # - qty_available
10+ # - virtual_available
11+ # - fmc
12+ # - amc
13+ if params.model == 'product.product':
14+ flds = ['default_code', 'name', 'uom_id']
15+ params.fields2 = ['Code', 'Description', 'UoM']
16
17 ctx = dict((params.context or {}), **rpc.session.context)
18 ctx['import_comp'] = bool(int(import_compat))
19@@ -396,7 +404,10 @@
20
21 if not params.ids or all_records:
22 domain = params.search_domain or []
23- ids = proxy.search(domain, 0, 2000, 0, ctx)
24+ if params.model == 'product.product':
25+ ids = proxy.search(domain, 0, None, 0, ctx)
26+ else:
27+ ids = proxy.search(domain, 0, 2000, 0, ctx)
28 else:
29 ids = params.ids or []
30 result = datas_read(ids, params.model, flds, context=ctx)
31
32=== modified file 'addons/openerp/controllers/templates/exp.mako'
33--- addons/openerp/controllers/templates/exp.mako 2012-03-09 10:08:59 +0000
34+++ addons/openerp/controllers/templates/exp.mako 2012-10-03 12:37:22 +0000
35@@ -203,7 +203,11 @@
36 </select>
37 </td>
38 <td class="label">
39+ %if model == 'product.product':
40+ <label for="all_records">Export all query results (<span style="color: #ff0000;">WARNING: could break down machines</span>):</label>
41+ %else:
42 <label for="all_records">Export all query results (limited to 2000 records):</label>
43+ %endif
44 </td>
45 <td>
46 <input type="checkbox" id="all_records" name="all_records" value="1"

Subscribers

People subscribed via source and target branches

to all changes: