Mapping of boolean fields
Bug #998078 reported by
Juan Rial (OpenERP)
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Enapps OpenERP CSV Import Tool |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Boolean fields deserve special treatment: they may be encoded as true/false, yes/no, 1/0, ... Currently there is no mechanism for specifying this encoding.
I propose adding two fields to the form when detecting a boolean field: "true value" and "false value". This has two advantages:
1) It's more flexible than hardcoding all known values for "true" and "false" and match those; also works for files in non-english.
2) It allows you to map true to false and vice versa. Example in my current project that would need this: the system we're importing from contains a flag "isdeleted" which is the logical negation of OpenERP's "active" field.
To post a comment you must log in.
Very good idea Juan, please do the patch and we will merge it in