Odoo Help

Welcome!

This community 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.

1

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

By
Michael Watchorn
on 3/5/14, 9:45 PM 653 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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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