Hello everyone, anyone can explain why it is happening? I have module that includes human resource, now when i import employees an error pops up saying:
File "/opt/openerp/server-7/openerp/addons/base_import/models.py", line 104, in get_fields
'string': field['string'],
KeyError: 'string'
I tried to change 'string': field['string'] ;which is found on the default module, into field.get('string') but here what the UI says:
Import preview failed due to: 'NoneType' object has no attribute 'lower'. The issue is usually an incorrect file encoding.
Any help is much appreciate.
Hello Anirudh Lou, Don't change the field['string'] as that does appear to be correct. a) Some questions: Did it work before and does not work now? If so, what was types of changes occurred in that between time? b) Check the data you are loading, particularly check the header fields. Then just try and load one row. Same error?
In my other module and other import, it works but not when importing employee and now i notice that even the export also pops up an error, here it says: name = parent_name + (parent_name and '/' or '') + field['string'] KeyError: 'string'
yeah, i return back to it's original code the field['string']