Odoo Help


Why is the hr.attendance date column called "name"?

Michael Watchorn
on 3/5/14, 9:45 PM 699 views

Can anyone explain why this OpenERP SA module uses such a confusing label for the date field?
Why is 'date' labeled 'name'?

    class hr_attendance(osv.osv):

      #... [omitted for clarity]... 

    _columns = {
        'name': fields.datetime('Date', required=True, select=1),

(This is in V7.0 hr_attendance.py)

Attendances can be uniquely identified by datetime ony. If you use employee name as the name field, there might different attendances for the same employee. So datetime is used as name.

Gopakumar N G
on 3/6/14, 3:42 AM

Your Answer

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

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 3/5/14, 9:45 PM
Seen: 699 times
Last updated: 8/30/16, 4:40 AM