In my company only office people are using openERP to sign in/out directly and for the others this attendance data should be imported. However, when I try to import attendance data it is not imported. Also, OpenERP doesn't show any error message but there appears a red line in place where error message should come.
My test file looks like this:
28,Sign Out,2013-08-02 09:23:18,__export__.hr_employee_98
27,Sign In,2013-08-02 08:22:57,__export__.hr_employee_98
where id is based on next id number after the previous data (which ids I checked by exporting existing attendance) I have also tried to import this file so that I have left the field id empty but it didn't work either. Importing any other data e.g. employees works as it should. So I started to wonder if it is possible to import attendances at all (e.g. because it would enable easy false data import)? But if it is so why any error message is not shown?
Has anyone else tried to import attendances to OpenERP? If so what did you do to make it work?
Edit: I noticed that it is possible to update existing attendances by using import so this problem seems to occur only if you are importing new data.
Edit 2: I also noticed that it is possible to double import same sign in/out data for same day with different ids (resulting in two sign ins and sign outs at same time for same day) but if I change day or time it won't import any data.
Found the problem, order of sign in and sign out is reversed when importing as compared to exported data i.e. exported data looks like this:
id, action, name, employee_id/id
__export__.hr_attendance_301, Sign Out, 2013-09-17 03:35:17, __export__.hr_employee_98
__export__.hr_attendance_300, Sign In, 2013-09-17 02:35:17, __export__.hr_employee_98
But when importing same data it should look like this:
"Sign In","2013-09-17 10:35:17","__export__.hr_employee_98"
"Sign Out","2013-09-17 11:35:17","__export__.hr_employee_98"
If you just want to import data you should not use the field
id in the import.
For me the following import data works fine (assuming that administrator is currently signed in):
"action","name","employee_id/.id" "Sign Out","2013-09-13 10:35:17",1 "Sign In","2013-09-14 10:35:17",1
I am using the database ID instead of the External ID, but his should not be any problem (if the external ID exists). You could also use
"employee_id" and write the name of the employee.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 8/20/13, 3:22 AM|
|Seen: 3842 times|
|Last updated: 3/16/15, 8:10 AM|