Merge lp:~jri-openerp/enapps-csv-import-tool/many2one_without_data into lp:~enapps-london-uk/enapps-csv-import-tool/old_trunk

Proposed by Juan Rial (OpenERP)
Status: Needs review
Proposed branch: lp:~jri-openerp/enapps-csv-import-tool/many2one_without_data
Merge into: lp:~enapps-london-uk/enapps-csv-import-tool/old_trunk
Diff against target: 12 lines (+2/-0)
1 file modified
ea_import/ea_import_template_line.py (+2/-0)
To merge this branch: bzr merge lp:~jri-openerp/enapps-csv-import-tool/many2one_without_data
Reviewer Review Type Date Requested Status
Enapps Ltd OpenERP Partner London UK Pending
Review via email: mp+105649@code.launchpad.net

Description of the change

[FIX] LP Bug #982975: skip empty cells if referenced field is not mandatory

To post a comment you must log in.

Unmerged revisions

3. By Juan Rial (OpenERP)

[FIX] LP Bug #982975: skip empty cells if referenced field is not mandatory

2. By Enapps Ltd OpenERP Partner London UK

fix invalid model reference

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ea_import/ea_import_template_line.py'
2--- ea_import/ea_import_template_line.py 2012-04-10 11:00:44 +0000
3+++ ea_import/ea_import_template_line.py 2012-05-14 13:07:20 +0000
4@@ -140,6 +140,8 @@
5 target_string = input_list[template_line.sequence - 1]
6 if not target_string.strip() and template_line.default_value:
7 target_string = template_line.default_value
8+ elif not target_string.strip() and not template_line.target_field.required:
9+ continue
10 template_line_type = template_line.field_type
11 if template_line.calculated and template_line_type in ['integer', 'float']:
12 calc_fields = sorted(template_line.calc_field_ids, key=lambda k: k.sequence)

Subscribers

People subscribed via source and target branches