Relate on the basis of non-primary key

Hi All,

I want to join Employee and Employee-Attendance tables having following columns:

Employee: id, badge_number
Employee-Attendance: badge-number, check_in_out_time

The join should be on the basis of badge-number (unique for each employee) instead of id column.

How can I declare the models and then view all Attendance records for an employee from ‘Relate’ button.

Regards,
Khurram.

You can not. Tryton is designed to use surrogate key only.
So your table Employee-Attendance should have an employee column.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.