Merge lp:~jri-openerp/enapps-csv-import-tool/boolean_false_never_written into lp:~jri-openerp/enapps-csv-import-tool/fully-patched

Proposed by Juan Rial (OpenERP) on 2012-05-16
Status: Merged
Merged at revision: 4
Proposed branch: lp:~jri-openerp/enapps-csv-import-tool/boolean_false_never_written
Merge into: lp:~jri-openerp/enapps-csv-import-tool/fully-patched
Diff against target: 15 lines (+2/-2)
1 file modified
ea_import/ea_import_template.py (+2/-2)
To merge this branch: bzr merge lp:~jri-openerp/enapps-csv-import-tool/boolean_false_never_written
Reviewer Review Type Date Requested Status
Juan Rial (OpenERP) Approve on 2012-05-23
Review via email: mp+105966@code.launchpad.net
To post a comment you must log in.
review: Approve

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.py'
2--- ea_import/ea_import_template.py 2012-04-10 11:00:44 +0000
3+++ ea_import/ea_import_template.py 2012-05-16 12:31:21 +0000
4@@ -76,9 +76,9 @@
5 for template_line in template.line_ids:
6 field_name = template_line.target_field.name
7 value = template_line.get_field(record_list, testing=True)
8- if template_line.default_value and not value:
9+ if template_line.default_value and value is None:
10 value = template_line.default_value
11- if value:
12+ if not value is None:
13 record.update({field_name: value})
14 if template_line.key_field:
15 upd_key.append((template_line.target_field.name, '=', value))

Subscribers

People subscribed via source and target branches

to all changes: