30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
from odoo import models, fields, api, exceptions, _
|
|
|
|
|
|
class YuthonKpiTasks(models.Model):
|
|
_name = 'yuthon.kpi.tasks'
|
|
_description = 'KPI '
|
|
|
|
name = fields.Char(string='名称', required=True)
|
|
department_id = fields.Many2one("hr.department", string="部门", required=True)
|
|
index_time = fields.Date(string='时间')
|
|
kpi_ids = fields.One2many('yuthon.kpi.detail.lines', 'kpi_id', string='KPI明细')
|
|
|
|
|
|
class YuthonKpiDetailLines(models.Model):
|
|
_name = 'yuthon.kpi.detail.lines'
|
|
_description = 'KPI明细行'
|
|
|
|
kpi_id = fields.Many2one('yuthon.kpi.tasks', string='KPI任务')
|
|
weight = fields.Float(string='权重')
|
|
kpl_name = fields.Char(string='kpl指标')
|
|
baseline_value = fields.Float(string='底线值')
|
|
datum_value = fields.Float(string='基准值')
|
|
efforts_value = fields.Float(string='努力值')
|
|
calculation_method = fields.Char(string='计算方法')
|
|
unit = fields.Char(string='计算单位')
|
|
current_value = fields.Text(string='当前完成值')
|
|
complete_sheet = fields.Text(string='完成情况说明')
|
|
score = fields.Float(string='得分')
|
|
total_score = fields.Float(string='总分')
|