Merge lp:~jri-openerp/enapps-csv-import-tool/boolean_false_never_written 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/boolean_false_never_written
Merge into: lp:~enapps-london-uk/enapps-csv-import-tool/old_trunk
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
Enapps Ltd OpenERP Partner London UK Pending
Review via email: mp+105664@code.launchpad.net

Description of the change

[FIX] LP Bug #999127: in generate_record, change check for existence of value from its boolean value to its equality to None

To post a comment you must log in.

Unmerged revisions

3. By Juan Rial (OpenERP)

[FIX] LP Bug #999127: change check for existence of value

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
=== modified file 'ea_import/ea_import_template.py'
--- ea_import/ea_import_template.py 2012-04-10 11:00:44 +0000
+++ ea_import/ea_import_template.py 2012-05-14 13:49:19 +0000
@@ -76,9 +76,9 @@
76 for template_line in template.line_ids:76 for template_line in template.line_ids:
77 field_name = template_line.target_field.name77 field_name = template_line.target_field.name
78 value = template_line.get_field(record_list, testing=True)78 value = template_line.get_field(record_list, testing=True)
79 if template_line.default_value and not value:79 if template_line.default_value and value is None:
80 value = template_line.default_value80 value = template_line.default_value
81 if value:81 if not value is None:
82 record.update({field_name: value})82 record.update({field_name: value})
83 if template_line.key_field:83 if template_line.key_field:
84 upd_key.append((template_line.target_field.name, '=', value))84 upd_key.append((template_line.target_field.name, '=', value))

Subscribers

People subscribed via source and target branches