Coverage for adhoc-cicd-odoo-odoo / odoo / _monkeypatches / csv.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-03-09 18:05 +0000

1import csv 

2 

3 

4def patch_module(): 

5 """ The default limit for CSV fields in the module is 128KiB, 

6 which is not quite sufficient to import images to store 

7 in attachment. 500MiB is a bit overkill, but better safe 

8 than sorry I guess 

9 """ 

10 class UNIX_LINE_TERMINATOR(csv.excel): 

11 lineterminator = '\n' 

12 csv.field_size_limit(500 * 1024 * 1024) 

13 csv.register_dialect("UNIX", UNIX_LINE_TERMINATOR)