14 lines
620 B
Python
14 lines
620 B
Python
from odoo import api, fields, models, tools
|
|
from odoo.exceptions import ValidationError
|
|
|
|
|
|
class AttendanceIotUser(models.Model):
|
|
_name = 'attendance.iot.user'
|
|
|
|
attendance_iot_id = fields.Many2one('attendance.iot', string="设备号")
|
|
attendance_address = fields.Char(related='attendance_iot_id.attendance_address', string="设备地址")
|
|
employee_id = fields.Many2one('hr.employee', string="员工")
|
|
company_id = fields.Many2one(related='employee_id.company_id', string="公司")
|
|
id_valid = fields.Date(string="有效日期")
|
|
image_1920 = fields.Many2one('ir.attachment', string="一寸照")
|