Merge lp:~unifield-team/unifield-web/uf-1696 into lp:unifield-web

Proposed by jftempo
Status: Merged
Merged at revision: 4682
Proposed branch: lp:~unifield-team/unifield-web/uf-1696
Merge into: lp:unifield-web
Diff against target: 29 lines (+14/-4)
1 file modified
addons/openerp/controllers/impex.py (+14/-4)
To merge this branch: bzr merge lp:~unifield-team/unifield-web/uf-1696
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+143248@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-10-03 12:32:26 +0000
3+++ addons/openerp/controllers/impex.py 2013-01-15 08:39:34 +0000
4@@ -391,11 +391,21 @@
5 # UF-1257 Only use Code, Description and UoM for export due to timeout error from products with some fields:
6 # - qty_available
7 # - virtual_available
8- # - fmc
9- # - amc
10+ # - product_amc
11+ # - reviewed_consumption
12+ # - monthly_consumption
13 if params.model == 'product.product':
14- flds = ['default_code', 'name', 'uom_id']
15- params.fields2 = ['Code', 'Description', 'UoM']
16+ tmp_flds = flds
17+ flds = []
18+ flds_to_remove = ['qty_available', 'virtual_available', 'product_amc', 'reviewed_consumption', 'monthly_consumption']
19+ fields_to_remove = ['Real Stock', 'Virtual Stock', 'Real Consumption', 'Monthly consumption', 'Forecasted Monthly Consumption']
20+ for f in tmp_flds:
21+ if f not in flds_to_remove:
22+ flds.append(f)
23+
24+ for f_r in fields_to_remove:
25+ if f_r in params.fields2:
26+ params.fields2.remove(f_r)
27
28 ctx = dict((params.context or {}), **rpc.session.context)
29 ctx['import_comp'] = bool(int(import_compat))

Subscribers

People subscribed via source and target branches

to all changes: