Merge lp:~openerp-dev/openobject-server/6.0-opw-5801-ado into lp:openobject-server/6.0

Proposed by Amit Dodiya (OpenERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: 3462
Merged at revision: 3575
Proposed branch: lp:~openerp-dev/openobject-server/6.0-opw-5801-ado
Merge into: lp:openobject-server/6.0
Diff against target: 29 lines (+4/-1)
1 file modified
bin/tools/translate.py (+4/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/6.0-opw-5801-ado
Reviewer Review Type Date Requested Status
Jay Vora (Serpent Consulting Services) (community) Approve
Review via email: mp+67032@code.launchpad.net

Description of the change

Hello Sir,

I have change the size of csv file while loading the data at the time of
Synchronize Translation.

Thanks,
Amit

To post a comment you must log in.
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/tools/translate.py'
2--- bin/tools/translate.py 2011-01-20 12:57:58 +0000
3+++ bin/tools/translate.py 2011-07-06 12:41:42 +0000
4@@ -32,6 +32,7 @@
5 import tarfile
6 import tempfile
7 import threading
8+import sys
9 from os.path import join
10
11 from datetime import datetime
12@@ -873,6 +874,8 @@
13 # now, the serious things: we read the language file
14 fileobj.seek(0)
15 if fileformat == 'csv':
16+ #Setting the limit of data while loading a CSV
17+ csv.field_size_limit(sys.maxint)
18 reader = csv.reader(fileobj, quotechar='"', delimiter=',')
19 # read the first line of the file (it contains columns titles)
20 for row in reader:
21@@ -991,7 +994,7 @@
22 def load_language(cr, lang):
23 """Loads a translation terms for a language.
24 Used mainly to automate language loading at db initialization.
25-
26+
27 :param lang: language ISO code with optional _underscore_ and l10n flavor (ex: 'fr', 'fr_BE', but not 'fr-BE')
28 :type lang: str
29 """