添加功能

This commit is contained in:
zhouzhou
2024-10-25 18:58:13 +08:00
parent 21e1f5e9a4
commit 69b2da20a8
35 changed files with 1771 additions and 351 deletions
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="seq_overtime_approval" model="ir.sequence">
<field name="name">加班申请序列号</field>
+17 -1
View File
@@ -10,6 +10,7 @@ class IssueLibrary(models.Model):
_rec_name = 'name'
name = fields.Char(string='议题事项')
name_text = fields.Text(string='议题事项')
code = fields.Char(string='编号', required=True, copy=False,
default=lambda self: self.env['ir.sequence'].next_by_code('issue_library_code'))
state = fields.Selection([('draft', '待提交'), ('approval', '审批中'), ('on_approval', '已审批'),
@@ -28,7 +29,9 @@ class IssueLibrary(models.Model):
issue_library_approval_line_ids = fields.One2many('issue.library.approval.line', 'issue_library_id', string='流程记录')
approval_decision_sequence = fields.Char(string="决策清单事项")
is_booking = fields.Boolean(string="是否上会")
cs_party = fields.Char(string='党支委')
cs_class = fields.Char(string='班子会')
cs_boss = fields.Char(string='董事会')
issue_library_room_line_ids = fields.One2many('issue.library.room.line', 'issue_library_id', string="关联会议明细行")
# 权限相关隐藏字段
employee_id = fields.Many2one('hr.employee', string='创建人', default=lambda self: self.env.user.employee_id)
@@ -145,7 +148,20 @@ class IssueLibrary(models.Model):
raise UserError('议题已上会,不能删除')
return super().unlink()
@api.onchange('name')
def _onchange_name(self):
self.name_text = self.name
@api.onchange('issue_library_room_line_ids')
def _onchange_issue_library_room_line_ids(self):
for record in self.issue_library_room_line_ids:
if record.meeting_type_id.name == '党委会':
self.cs_party = record.room_booking_id.name
elif record.meeting_type_id.name == '班子会':
self.cs_class = record.room_booking_id.name
elif record.meeting_type_id.name == '董事会':
self.cs_boss = record.room_booking_id.name
class IssueLibraryLine(models.Model):
_name = "issue.library.line"
_description = '决策清单'
@@ -10,4 +10,3 @@ access_issue_meeting_minutes_line,issue_meeting_minutes_line,model_issue_meeting
access_issue_meeting_minutes,issue_meeting_minutes,model_issue_meeting_minutes,base.group_user,1,1,1,1
access_issue_meeting_line,issue_meeting_line,model_issue_meeting_line,base.group_user,1,1,1,1
access_issue_library_room_line,issue_library_room_line,model_issue_library_room_line,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
10 access_issue_meeting_minutes issue_meeting_minutes model_issue_meeting_minutes base.group_user 1 1 1 1
11 access_issue_meeting_line issue_meeting_line model_issue_meeting_line base.group_user 1 1 1 1
12 access_issue_library_room_line issue_library_room_line model_issue_library_room_line base.group_user 1 1 1 1
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -19,7 +19,7 @@
'views/yuthon_performance_menus.xml',
'views/yuthon_plan_management.xml',
'views/yuthon_Index_approval.xml',
'views/yuthon_duty_approval.xml',
'views/yuthon_tissue_duty_approval.xml',
'views/yuthon_index_employee.xml',
'views/yuthon_employee_approval.xml',
'views/yuthon_plan_approval.xml',
@@ -13,4 +13,18 @@
<field name="prefix">GR%(y)s%(month)s%(day)s</field>
<field name="padding">3</field>
</record>
<record id="duty_approval_code" model="ir.sequence">
<field name="name">组织绩效变更-编号</field>
<field name="code">duty_approval_code</field>
<field name="prefix">ZJ%(y)s%(month)s%(day)s</field>
<field name="padding">3</field>
</record>
<record id="employee_duty_approval_code" model="ir.sequence">
<field name="name">员工绩效变更-编号</field>
<field name="code">employee_duty_approval_code</field>
<field name="prefix">YJ%(y)s%(month)s%(day)s</field>
<field name="padding">3</field>
</record>
</odoo>
+2 -2
View File
@@ -4,11 +4,11 @@ from . import yuthon_Index_management
from . import yuthon_duty_management
from . import yuthon_plan_management
from . import yuthon_Index_approval
from . import yuthon_duty_approval
from . import yuthon_tissue_duty_approval
from . import yuthon_index_employee
from . import yuthon_plan_approval
from . import yuthon_assessment_tasks
from . import yuthon_employee_performance
from . import yuthon_grading_tasks
from . import yuthon_kpi_tasks
from . import yuthon_employee_appraisal
from . import yuthon_employee_appraisal
@@ -63,7 +63,6 @@ class YuthonIndexManagement(models.Model):
index_applicant_kpi.append((0, 0,{
'duty_index_name':record.id,
}))
else:
index_applicant_gs.append((0, 0,{
'work_task':record.development_goals,
@@ -1,19 +0,0 @@
from odoo import models, fields, api, exceptions, _
class YuthonDutyApproval(models.Model):
_name = 'yuthon.duty.approval'
_description = "部门责任书变更管理"
_rec_name = 'name'
name = fields.Char('标题')
creation_time = fields.Datetime(string='申请日期', default=lambda self: fields.Datetime.now())
job_id = fields.Many2one('hr.job', string="岗位")
reason_text = fields.Html(string='申请事由')
# 指标变更
change_duty_kpi_ids = fields.One2many('yuthon.kpi.line', 'change_duty_kpi_id', string="KPI变更明细")
change_duty_gs_ids = fields.One2many('yuthon.gs.line', 'change_duty_gs_id', string="GS变更明细")
index_duty_approval_ids = fields.One2many('yuthon.index.management', 'index_duty_approval_id', string="部门责任变更明细")
@@ -18,6 +18,7 @@ class YuthonDutyManagement(models.Model):
users_role_ids = fields.Many2many('soong.user.role', string='被考核角色')
users_ids = fields.Many2many('hr.employee', string='被考核人员')
index_statu = fields.Selection([('work', '生效'), ('void', '作废')], '状态', required=True)
# 绩效考核
performance_kpi_ids = fields.One2many('yuthon.kpi.line', 'performance_kpi_id', string="KPI")
performance_gs_ids = fields.One2many('yuthon.gs.line', 'performance_gs_id', string="GS")
@@ -67,25 +68,25 @@ class YuthonDutyManagement(models.Model):
})
return result
@api.depends('users_role_ids')
def _compute_users_role_ids(self):
if self.users_role_ids:
for user_id in self.users_role_ids:
user_role_data = self.env['hr.employee'].search(
['|', ('user_role_id', '=', user_id.id.origin), ('user_role_ids', '=', user_id.id.origin)])
users_role_list = [ro.user_id.id for ro in user_role_data]
self.users_ids = [(6, 0, users_role_list)]
def button_tissue_approval(self):
form_id = self.env.ref('yuthon_performance.yuthon_tissue_duty_approval_form').id
return {
'name': '组织绩效变更',
'type': 'ir.actions.act_window',
'res_model': 'yuthon.tissue.duty.approval',
'views': [(form_id, 'form')],
'context': {'default_change_duty_kpi_ids':self.performance_kpi_ids.ids,
'default_change_duty_gs_ids':self.performance_gs_ids.ids,
}}
class YuthonKpiLine(models.Model):
_name = 'yuthon.kpi.line'
_description = "KPI明细行"
_rec_name = ''
# 链接部门责任书和变更菜单
performance_kpi_id = fields.Many2one('yuthon.duty.management', string="KPI")
change_duty_kpi_id = fields.Many2one('yuthon.duty.approval', string="KPI变更明细")
#
# KPI
# 指标名称
change_duty_kpi_id = fields.Many2one('yuthon.tissue.duty.approval', string="KPI变更明细")
duty_index_name = fields.Many2one('yuthon.index.management',string='指标名称', store=True)#
duty_index_definition = fields.Text(related='duty_index_name.index_definition', string="指标定义")
@@ -114,7 +115,7 @@ class YuthonGsLine(models.Model):
#
# # 链接部门责任书和变更菜单
performance_gs_id = fields.Many2one('yuthon.duty.management', string="GS")
change_duty_gs_id = fields.Many2one('yuthon.duty.approval', string="GS变更明细")
change_duty_gs_id = fields.Many2one('yuthon.tissue.duty.approval', string="GS变更明细")
index_name_id = fields.Many2one('yuthon.index.management')
work_task = fields.Char(related='index_name_id.index_name', string="工作任务")
@@ -22,8 +22,10 @@ class YuthonAppraisalLineDetail(models.Model):
_name = 'yuthon.appraisal.line.detail'
_description = '员工绩效考核明细行'
appraisal_id = fields.Many2one('yuthon.employee.appraisal', string='关联员工绩效')
appraisal_id = fields.Many2one('yuthon.employee.appraisal', string='关联绩效考核表(员工)')
evaluation_id = fields.Many2one('yuthon.employee.performance', string='关联考核任务(员工)')
yuthon_employee_duty_approval_id = fields.Many2one('yuthon.employee.duty.approval',string='关联原员工绩效变更')
evaluation_dimensions = fields.Char(string='评价维度')
illustrate = fields.Char(string='说明')
grade = fields.Float(string='评分')
@@ -0,0 +1,93 @@
from odoo import models, fields, api, exceptions, _
class YuthonTissueDutyApproval(models.Model):
_name = 'yuthon.tissue.duty.approval'
_description = "组织绩效变更申请表"
_inherit = ['soong.workflow.mixin']
_rec_name = 'name'
name = fields.Char('标题')
creation_time = fields.Datetime(string='申请日期', default=lambda self: fields.Datetime.now())
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('duty_approval_code'))
job_id = fields.Many2one('hr.job', string="岗位")
reason_text = fields.Html(string='申请事由')
# 指标变更
change_duty_kpi_ids = fields.One2many('yuthon.kpi.line', 'change_duty_kpi_id', string="原KPI明细")
change_duty_gs_ids = fields.One2many('yuthon.gs.line', 'change_duty_gs_id', string="原GS明细")
new_kpi_duty_approval_ids = fields.One2many('new.kpi.duty.approval', 'yuthon_tissue_duty_approval_id', string="关联新组织绩效KPI变更明细")
new_gs_duty_approval_ids = fields.One2many('new.gs.duty.approval', 'yuthon_tissue_duty_approval_id', string="关联新组织绩效GS变更明细")
is_kpi = fields.Boolean('是否KPI')
is_gs = fields.Boolean('是否GS')
@api.onchange('change_duty_kpi_ids')
def onchange_change_index_library_ids(self):
new_lines = []
for old in self:
for new in old.change_duty_kpi_ids:
new_lines.append((0, 0, {
'new_duty_index_name': new.duty_index_name.index_name,
'new_duty_index_definition': new.duty_index_definition,
'new_weight': new.weight,
'new_unit_compute':new.unit_compute
}))
self.new_kpi_duty_approval_ids = new_lines
@api.onchange('change_duty_gs_ids')
def onchange_change_index_gs_library_ids(self):
new_lines = []
for old in self:
for new in old.change_duty_gs_ids:
new_lines.append((0, 0, {
'new_work_task': new.work_task,
'new_compute_act': new.compute_act,
'new_node_target': new.node_target,
'new_quality_objectives': new.quality_objectives,
'new_node_target1': new.node_target1,
'new_quality_objectives1':new.quality_objectives1,
'new_node_target2': new.node_target2,
'new_quality_objectives2': new.quality_objectives2,
'new_weight': new.weight
}))
self.new_gs_duty_approval_ids = new_lines
@api.model_create_multi
def create(self, vals_list):
res = super().create(vals_list)
for vals in vals_list:
if vals['new_kpi_duty_approval_ids']:
for line in vals['new_kpi_duty_approval_ids']:
self.env['yuthon.kpi.line'].create({
'performance_kpi_id':res.id,
'duty_index_name':line.new_duty_index_name
})
return res
class NewKpiDutyApproval(models.Model):
_name = 'new.kpi.duty.approval'
_description = "新组织绩效KPI变更申请表"
yuthon_tissue_duty_approval_id = fields.Many2one('yuthon.tissue.duty.approval', string="关联组织绩效变更申请表")
new_duty_index_name = fields.Char(string='指标名称', store=True) #
new_duty_index_definition = fields.Text(string="指标定义")
new_weight = fields.Float(string="权重")
new_unit_compute = fields.Char(string="单位计算")
class NewGsDutyApproval(models.Model):
_name = 'new.gs.duty.approval'
_description = "新组织绩效GS变更申请表"
yuthon_tissue_duty_approval_id = fields.Many2one('yuthon.tissue.duty.approval', string="关联组织绩效变更申请表")
new_work_task = fields.Char(string="工作任务")
new_compute_act = fields.Char(string="计划安排及具体措施/行动")
new_node_target = fields.Char(string="节点目标")
new_quality_objectives = fields.Char(string="质量目标")
new_node_target1 = fields.Char(string="节点目标")
new_quality_objectives1 = fields.Char(string="质量目标")
new_node_target2 = fields.Char(string="节点目标")
new_quality_objectives2 = fields.Char(string="质量目标")
new_weight = fields.Char(string="权重%")
@@ -6,7 +6,7 @@ access_yuthon_plan_management_line,yuthon_plan_management_line,model_yuthon_plan
access_yuthon_index_approval,yuthon_index_approval,model_yuthon_index_approval,base.group_user,1,1,1,1
access_yuthon_kpi_line,yuthon_kpi_line,model_yuthon_kpi_line,base.group_user,1,1,1,1
access_yuthon_gs_line,yuthon_gs_line,model_yuthon_gs_line,base.group_user,1,1,1,1
access_yuthon_duty_approval,yuthon_duty_approval,model_yuthon_duty_approval,base.group_user,1,1,1,1
access_yuthon_tissue_duty_approval,yuthon_tissue_duty_approval,model_yuthon_tissue_duty_approval,base.group_user,1,1,1,1
access_yuthon_plan_approval,yuthon_plan_approval,model_yuthon_plan_approval,base.group_user,1,1,1,1
access_yuthon_index_employee,yuthon_index_employee,model_yuthon_index_employee,base.group_user,1,1,1,1
access_yuthon_employee_approval,yuthon_employee_approval,model_yuthon_employee_approval,base.group_user,1,1,1,1
@@ -23,4 +23,6 @@ access_yuthon_assessment_tasks_lines,yuthon_assessment_tasks_lines,model_yuthon_
access_yuthon_assessment_tasks_wizard,yuthon_assessment_tasks_wizard,model_yuthon_assessment_tasks_wizard,base.group_user,1,1,1,1
access_yuthon_index_employee_line,yuthon_index_employee_line,model_yuthon_index_employee_line,base.group_user,1,1,1,1
access_new_index_management_line,new_index_management_line,model_new_index_management_line,base.group_user,1,1,1,1
access_new_employee_library_line,new_employee_library_line,model_new_employee_library_line,base.group_user,1,1,1,1
access_new_employee_library_line,new_employee_library_line,model_new_employee_library_line,base.group_user,1,1,1,1
access_new_kpi_duty_approval,new_kpi_duty_approval,model_new_kpi_duty_approval,base.group_user,1,1,1,1
access_new_gs_duty_approval,new_gs_duty_approval,model_new_gs_duty_approval,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
6 access_yuthon_index_approval yuthon_index_approval model_yuthon_index_approval base.group_user 1 1 1 1
7 access_yuthon_kpi_line yuthon_kpi_line model_yuthon_kpi_line base.group_user 1 1 1 1
8 access_yuthon_gs_line yuthon_gs_line model_yuthon_gs_line base.group_user 1 1 1 1
9 access_yuthon_duty_approval access_yuthon_tissue_duty_approval yuthon_duty_approval yuthon_tissue_duty_approval model_yuthon_duty_approval model_yuthon_tissue_duty_approval base.group_user 1 1 1 1
10 access_yuthon_plan_approval yuthon_plan_approval model_yuthon_plan_approval base.group_user 1 1 1 1
11 access_yuthon_index_employee yuthon_index_employee model_yuthon_index_employee base.group_user 1 1 1 1
12 access_yuthon_employee_approval yuthon_employee_approval model_yuthon_employee_approval base.group_user 1 1 1 1
23 access_yuthon_assessment_tasks_wizard yuthon_assessment_tasks_wizard model_yuthon_assessment_tasks_wizard base.group_user 1 1 1 1
24 access_yuthon_index_employee_line yuthon_index_employee_line model_yuthon_index_employee_line base.group_user 1 1 1 1
25 access_new_index_management_line new_index_management_line model_new_index_management_line base.group_user 1 1 1 1
26 access_new_employee_library_line new_employee_library_line model_new_employee_library_line base.group_user 1 1 1 1
27 access_new_kpi_duty_approval new_kpi_duty_approval model_new_kpi_duty_approval base.group_user 1 1 1 1
28 access_new_gs_duty_approval new_gs_duty_approval model_new_gs_duty_approval base.group_user 1 1 1 1
@@ -39,25 +39,25 @@
<notebook>
<page string="组织绩效详情">
<group string="原指标库">
<field name="change_index_library_ids" string=" ">
<tree editable="bottom" create="false" delete="false" edit="false">
<field name="change_index_library_id" column_invisible="1"/>
<field name="dimension"/>
<field name="development_goals"/>
<field name="index_name"/>
<field name="index_definition"/>
<field name="index_type"/>
<field name="index_compute"/>
<field name="compute_type"/>
<field name="check_norm"/>
<field name="department_ids" widget="many2many_tags"/>
<field name="in_charge_role_ids" widget="many2many_tags"/>
<field name="employee_id"/>
<field name="start_index_time"/>
<field name="end_index_time"/>
<button name="open_record" type="object" string="详情信息" class="btn btn-primary"/>
</tree>
</field>
<group/>
<field name="change_index_library_ids" string=" ">
<tree editable="bottom" create="false" delete="false" edit="false">
<field name="change_index_library_id" column_invisible="1"/>
<field name="dimension"/>
<field name="development_goals"/>
<field name="index_name"/>
<field name="index_definition"/>
<field name="index_type"/>
<field name="index_compute"/>
<field name="compute_type"/>
<field name="check_norm"/>
<field name="department_ids" widget="many2many_tags"/>
<field name="in_charge_role_ids" widget="many2many_tags"/>
<field name="employee_id"/>
<field name="start_index_time"/>
<field name="end_index_time"/>
</tree>
</field>
</group>
<group string="新指标库">
<field name="new_index_library_ids" string=" ">
@@ -1,91 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Views -->
<record id="yuthon_duty_approval_tree" model="ir.ui.view">
<field name="name">yuthon.duty.approval.tree</field>
<field name="model">yuthon.duty.approval</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="creation_time"/>
</tree>
</field>
</record>
<!-- Form-->
<record id="yuthon_duty_approval_form" model="ir.ui.view">
<field name="name">yuthon.duty.approval.form</field>
<field name="model">yuthon.duty.approval</field>
<field name="arch" type="xml">
<form>
<sheet>
<div class="oe_title">
<label for="name"/>
<h1>
<field name="name"/>
</h1>
</div>
<group>
<group>
<field name="creation_time"/>
<field name="reason_text"/>
</group>
<group>
<field name="job_id"/>
</group>
</group>
<notebook>
<page string="绩效明细">
<group>
<group string="KPI">
<field name="index_duty_approval_ids">
<tree editable="bottom">
<field name="index_name" string="考核任务名称"/>
<field name="index_definition" string="指标定义"/>
<field name="compute_type" string="计算类别"/>
<field name="weight"/>
<field name="compute_method"/>
<field name="unit_compute"/>
<field name="employee_id"/>
<field name="in_charge_role_ids" widget="many2many_tags"/>
</tree>
</field>
</group>
</group>
<group>
<group string="GS">
<field name="index_duty_approval_ids">
<tree editable="bottom">
<field name="index_name" string="工作任务"/>
<field name="compute_type" string="计算类别"/>
<field name="compute_act"/>
<field name="weight"/>
<field name="employee_id"/>
<field name="in_charge_role_ids" widget="many2many_tags"/>
</tree>
</field>
</group>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="yuthon_duty_approval_search" model="ir.ui.view">
<field name="name">yuthon.duty.approval.search</field>
<field name="model">yuthon.duty.approval</field>
<field name="arch" type="xml">
<search string="责任书变更查询">
<field name="name"/>
</search>
</field>
</record>
<!-- Action-->
<record id="yuthon_duty_approval_action" model="ir.actions.act_window">
<field name="name">部门责任变更</field>
<field name="res_model">yuthon.duty.approval</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>
@@ -12,6 +12,7 @@
<field name="start_index_time"/>
<field name="end_index_time"/>
<field name="index_statu"/>
<button name="button_tissue_approval" type="object" string="提交责任书变更"/>
</tree>
</field>
</record>
@@ -39,18 +39,19 @@
<notebook>
<page string="员工绩效">
<group string="原员工指标库">
<field name="change_employee_library_ids" string=" ">
<tree editable="bottom" create="false" delete="false" edit="false">
<field name="dimension"/>
<field name="change_employee_library_id" column_invisible="1"/>
<field name="department_ids" widget="many2many_tags"/>
<field name="users_role_ids" widget="many2many_tags"/>
<field name="employee_ids" widget="many2many_tags"/>
<field name="start_index_time"/>
<field name="end_index_time"/>
<button name="open_record" type="object" string="详情信息" class="btn btn-primary"/>
</tree>
</field>
<group/>
<field name="change_employee_library_ids" string=" ">
<tree editable="bottom" create="false" delete="false" edit="false">
<field name="dimension"/>
<field name="change_employee_library_id" column_invisible="1"/>
<field name="department_ids" widget="many2many_tags"/>
<field name="users_role_ids" widget="many2many_tags"/>
<field name="employee_ids" widget="many2many_tags"/>
<field name="start_index_time"/>
<field name="end_index_time"/>
<button name="open_record" type="object" string="详情信息" class="btn btn-primary"/>
</tree>
</field>
</group>
<group string="新员工指标库">
<field name="new_change_employee_library_ids" string=" ">
@@ -33,39 +33,6 @@
name="员工绩效指标库"
sequence="3"
action="yuthon_index_management_action"/>
<!-- <menuitem id="yuthon_performance_approval_management_menu"-->
<!-- parent="yuthon_performance_menu_config_root"-->
<!-- name="指标变更申请表"-->
<!-- action="yuthon_index_approval_action"-->
<!-- sequence="5"/>-->
<!-- <menuitem id="yuthon_plan_management_menu"-->
<!-- parent="yuthon_performance_menu_config_root"-->
<!-- name="计划管理"-->
<!-- sequence="5"/>-->
<!-- <menuitem id="yuthon_plan_management"-->
<!-- parent="yuthon_plan_management_menu"-->
<!-- name="个人计划"-->
<!-- sequence="1"-->
<!-- action="yuthon_plan_management_action"/>-->
<!-- <menuitem id="yuthon_performance_approval_management_menu"-->
<!-- parent="yuthon_performance_menu_config_root"-->
<!-- name="指标变更管理"-->
<!-- sequence="7"/>-->
<!-- <menuitem id="yuthon_index_approval_management"-->
<!-- parent="yuthon_performance_approval_management_menu"-->
<!-- name="指标库变更"-->
<!-- sequence="1"-->
<!-- action="yuthon_index_approval_action"/>-->
<!-- <menuitem id="yuthon_duty_approval_management"-->
<!-- parent="yuthon_performance_approval_management_menu"-->
<!-- name="部门责任书变更"-->
<!-- sequence="3"-->
<!-- action="yuthon_duty_approval_action"/>-->
<!-- <menuitem id="yuthon_plan_approval_management"-->
<!-- parent="yuthon_performance_approval_management_menu"-->
<!-- name="个人计划变更"-->
<!-- sequence="5"-->
<!-- action="yuthon_plan_approval_action"/>-->
</odoo>
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Views -->
<record id="yuthon_tissue_duty_approval_tree" model="ir.ui.view">
<field name="name">yuthon.tissue.duty.approval.tree</field>
<field name="model">yuthon.tissue.duty.approval</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="creation_time"/>
</tree>
</field>
</record>
<!-- Form-->
<record id="yuthon_tissue_duty_approval_form" model="ir.ui.view">
<field name="name">yuthon.tissue.duty.approval.form</field>
<field name="model">yuthon.tissue.duty.approval</field>
<field name="arch" type="xml">
<form>
<sheet>
<group col="3">
<group>
<field name="code"/>
<field name="creation_time"/>
</group>
<group>
<field name="job_id"/>
</group>
<group>
<field name="is_kpi"/>
<field name="is_gs"/>
</group>
</group>
<group string="审批事项" col="3">
<group>
<field name="name"/>
<field name="reason_text"/>
</group>
<group/>
<group/>
</group>
<notebook>
<page string="组织绩效KPI" invisible="is_kpi == False">
<group string="原KPI组织绩效">
<group/>
<field name="change_duty_kpi_ids" string=" " >
<tree editable="bottom" create="false" delete="false" edit="false">
<field name="duty_index_name"/>
<field name="duty_index_definition"/>
<field name="weight"/>
<field name="unit_compute"/>
</tree>
</field>
</group>
<group string="新KPI组织绩效">
<field name="new_kpi_duty_approval_ids" string=" ">
<tree editable="bottom" delete="false">
<field name="yuthon_tissue_duty_approval_id" column_invisible="1"/>
<field name="new_duty_index_name"/>
<field name="new_duty_index_definition"/>
<field name="new_weight"/>
<field name="new_unit_compute"/>
</tree>
</field>
</group>
</page>
<page string="组织绩效GS" invisible="is_gs == False">
<group string="原组织绩效GS">
<group/>
<field name="change_duty_gs_ids" string=" ">
<tree editable="bottom" create="false" delete="false" edit="false">
<field name="work_task"/>
<field name="compute_act"/>
<field name="node_target"/>
<field name="quality_objectives"/>
<field name="node_target1"/>
<field name="quality_objectives1"/>
<field name="node_target2"/>
<field name="quality_objectives2"/>
<field name="weight"/>
</tree>
</field>
</group>
<group string="新GS组织绩效" delete="false">
<field name="new_gs_duty_approval_ids" string=" ">
<tree editable="bottom" delete="false">
<field name="yuthon_tissue_duty_approval_id" column_invisible="1"/>
<field name="new_work_task"/>
<field name="new_compute_act"/>
<field name="new_node_target"/>
<field name="new_quality_objectives"/>
<field name="new_node_target1"/>
<field name="new_quality_objectives1"/>
<field name="new_node_target2"/>
<field name="new_quality_objectives2"/>
<field name="new_weight"/>
</tree>
</field>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Action-->
<record id="yuthon_tissue_duty_approval_action" model="ir.actions.act_window">
<field name="name">组织绩效变更申请表</field>
<field name="res_model">yuthon.tissue.duty.approval</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>
+2
View File
@@ -10,6 +10,7 @@
'data': [
'security/ir.model.access.csv',
'data/data_yuthon_resource_mgmt_config.xml',
'data/yuthon_property_approval_data.xml',
'views/yuthon_property_views.xml',
'views/property_type_views.xml',
'views/property_patrol_duty.xml',
@@ -20,6 +21,7 @@
'views/yuthon_draw_result_views.xml',
'views/yuthon_expert_database_views.xml',
'views/yuthon_resource_mgmt_config_views.xml',
'views/property_evaluate_application_views.xml',
'views/yuthon_property_evaluation_views.xml',
'views/menuitem.xml',
],
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="yuthon_property_code_sequence" model="ir.sequence">
<field name="name">评估申请编号</field>
<field name="code">yuthon_property_code</field>
<field name="prefix">PG%(y)s%(month)s%(day)s</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
</odoo>
+1
View File
@@ -9,3 +9,4 @@ from . import yuthon_resource_mgmt_config
from . import yuthon_draw_result
from . import yuthon_expert_database
from . import yuthon_property_evaluation
from . import property_evaluate_application
@@ -0,0 +1,19 @@
from odoo import models, fields, api
class PropertyEvaluateApplication(models.Model):
_name = 'property.evaluate.application'
_description = '物业评估申请'
_inherit = 'mail.activity.mixin'
name = fields.Char(string='标题')
code = fields.Char(string='编号', required=True, copy=False,
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_property_code_sequence'))
main_text = fields.Html(string='正文')
is_meet = fields.Boolean(string="是否上会")
is_experts = fields.Boolean(string="是否需要专家评审")
notice_documents_ids = fields.Many2many('ir.attachment', string='议题附件')
property_message_ids = fields.One2many('yuthon.property.evaluation', 'property_message_id', string='物业信息明细行')
@@ -0,0 +1,22 @@
from odoo import models, fields, api
class PropertyRentalForm(models.Model):
_name = 'yuthon.property.rental.form'
_description = '出租申报表'
name = fields.Char(string='名称')
property_address = fields.Char(string='物业地址')
registered_use = fields.Char(string='证载用途')
evaluation_area = fields.Float(string='出租面积(m²)')
current_status = fields.Date(string='租聘到期日')
owner = fields.Char(string='原租户')
now_rent_price = fields.Float(string='现租价(元/m² •月)')
evaluate_rent_price = fields.Float(string='评估租(元/m² •月)')
upset_square = fields.Float(string='底价(元/m² •月)')
upset = fields.Float(string='底价(元/月)')
lease_period = fields.Char(string='租凭年限')
increment_rate = fields.Float(string='递增率')
rental_use = fields.Char(string='出租用途')
other = fields.Char(string='其他')
remarks = fields.Text(string='备注')
+1 -1
View File
@@ -21,7 +21,7 @@ class YuthonProperty(models.Model):
('entrust', '委托'), ('Rent', '租入')], string='资产来源')
remark = fields.Char(string="备注")
vr_link = fields.Char(string="VR链接")
other_materials = fields.Binary(string="其他材料", readonly=False)
notice_documents_ids = fields.Many2many('ir.attachment', string='议题附件')
abbreviation = fields.Char(string="简称")
property_floor = fields.Integer(string="楼层")
@@ -34,3 +34,7 @@ class YuthonPropertyEvaluation(models.Model):
evaluation_whole_rent_price = fields.Float(string='评估整租单价(元/m² •月)')
evaluation_whole_rent_total = fields.Float(string='评估总价(元•月,整租)')
assessment_category = fields.Char(string='评估类别')
property_message_id = fields.Many2one('property.evaluate.application', string='关联物业评估申请')
@@ -2,19 +2,6 @@ from pkg_resources import require
from odoo import models, fields, api
class YuthonResourceMgmtConfig(models.Model):
_name = 'yuthon.resource.mgmt.config'
_description = '资源管理配置'
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
asset_type_id = fields.Many2one('yuthon.resource.type', string="资产类型", required=True)
house_type_id = fields.Many2one('yuthon.resource.house.type', string="户型")
purpose_id = fields.Many2one('yuthon.resource.purpose', string="用途")
mgmt_type_id = fields.Many2one('yuthon.resource.management.type', string="管理类型")
billing_type_id = fields.Many2one('yuthon.resource.billing.type', string="开票类型")
class YuthonResourceType(models.Model):
_name = 'yuthon.resource.type'
_description = '资产类型'
+10 -11
View File
@@ -6,16 +6,15 @@ access_property_patrol_plan,property_patrol_plan,model_property_patrol_plan,base
access_property_route_management,property_route_management,model_property_route_management,base.group_user,1,1,1,1
access_property_patrol_position,property_patrol_position,model_property_patrol_position,base.group_user,1,1,1,1
access_property_patrol_standard,property_patrol_standard,model_property_patrol_standard,base.group_user,1,1,1,1
access_yuthon_draw_result,yuthon.draw.result,model_yuthon_draw_result,base.group_user,1,1,1,1
access_yuthon_expert_database,yuthon.expert.database,model_yuthon_expert_database,base.group_user,1,1,1,1
access_yuthon_property_water,yuthon.property.water,model_yuthon_property_water,base.group_user,1,1,1,1
access_yuthon_property_energy,yuthon.property.energy,model_yuthon_property_energy,base.group_user,1,1,1,1
access_yuthon_resource_mgmt_config,yuthon.resource.mgmt.config,model_yuthon_resource_mgmt_config,base.group_user,1,1,1,1
access_yuthon_resource_type,yuthon.resource.type,model_yuthon_resource_type,base.group_user,1,1,1,1
access_yuthon_resource_house_type,yuthon.resource.house.type,model_yuthon_resource_house_type,base.group_user,1,1,1,1
access_yuthon_resource_purpose,yuthon.resource.purpose,model_yuthon_resource_purpose,base.group_user,1,1,1,1
access_yuthon_resource_management_type,yuthon.resource.management.type,model_yuthon_resource_management_type,base.group_user,1,1,1,1
access_yuthon_resource_billing_type,yuthon.resource.billing.type,model_yuthon_resource_billing_type,base.group_user,1,1,1,1
access_yuthon_property_evaluation,yuthon.property.evaluation,model_yuthon_property_evaluation,base.group_user,1,1,1,1
access_yuthon_draw_result,yuthon_draw_result,model_yuthon_draw_result,base.group_user,1,1,1,1
access_yuthon_expert_database,yuthon_expert_database,model_yuthon_expert_database,base.group_user,1,1,1,1
access_yuthon_property_water,yuthon_property_water,model_yuthon_property_water,base.group_user,1,1,1,1
access_yuthon_property_energy,yuthon_property_energy,model_yuthon_property_energy,base.group_user,1,1,1,1
access_yuthon_resource_type,yuthon_resource_type,model_yuthon_resource_type,base.group_user,1,1,1,1
access_yuthon_resource_house_type,yuthon_resource_house_type,model_yuthon_resource_house_type,base.group_user,1,1,1,1
access_yuthon_resource_purpose,yuthon_resource_purpose,model_yuthon_resource_purpose,base.group_user,1,1,1,1
access_yuthon_resource_management_type,yuthon_resource_management_type,model_yuthon_resource_management_type,base.group_user,1,1,1,1
access_yuthon_resource_billing_type,yuthon_resource_billing_type,model_yuthon_resource_billing_type,base.group_user,1,1,1,1
access_property_evaluate_application,property_evaluate_application,model_property_evaluate_application,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
6 access_property_route_management property_route_management model_property_route_management base.group_user 1 1 1 1
7 access_property_patrol_position property_patrol_position model_property_patrol_position base.group_user 1 1 1 1
8 access_property_patrol_standard property_patrol_standard model_property_patrol_standard base.group_user 1 1 1 1
9 access_yuthon_draw_result yuthon.draw.result yuthon_draw_result model_yuthon_draw_result base.group_user 1 1 1 1
10 access_yuthon_expert_database yuthon.expert.database yuthon_expert_database model_yuthon_expert_database base.group_user 1 1 1 1
11 access_yuthon_property_water yuthon.property.water yuthon_property_water model_yuthon_property_water base.group_user 1 1 1 1
12 access_yuthon_property_energy yuthon.property.energy yuthon_property_energy model_yuthon_property_energy base.group_user 1 1 1 1
13 access_yuthon_resource_mgmt_config access_yuthon_resource_type yuthon.resource.mgmt.config yuthon_resource_type model_yuthon_resource_mgmt_config model_yuthon_resource_type base.group_user 1 1 1 1
14 access_yuthon_resource_type access_yuthon_resource_house_type yuthon.resource.type yuthon_resource_house_type model_yuthon_resource_type model_yuthon_resource_house_type base.group_user 1 1 1 1
15 access_yuthon_resource_house_type access_yuthon_resource_purpose yuthon.resource.house.type yuthon_resource_purpose model_yuthon_resource_house_type model_yuthon_resource_purpose base.group_user 1 1 1 1
16 access_yuthon_resource_purpose access_yuthon_resource_management_type yuthon.resource.purpose yuthon_resource_management_type model_yuthon_resource_purpose model_yuthon_resource_management_type base.group_user 1 1 1 1
17 access_yuthon_resource_management_type access_yuthon_resource_billing_type yuthon.resource.management.type yuthon_resource_billing_type model_yuthon_resource_management_type model_yuthon_resource_billing_type base.group_user 1 1 1 1
18 access_yuthon_resource_billing_type access_property_evaluate_application yuthon.resource.billing.type property_evaluate_application model_yuthon_resource_billing_type model_property_evaluate_application base.group_user 1 1 1 1
access_yuthon_property_evaluation yuthon.property.evaluation model_yuthon_property_evaluation base.group_user 1 1 1 1
19
20
+5 -5
View File
@@ -21,12 +21,12 @@
sequence="1"
name="待评估"
parent="yuthon_property_menu"
action="property_assess_action"/>
action="yuthon_property_evaluation_action1"/>
<menuitem id="yuthon_property_evaluate_application_menu"
sequence="3"
name="评估申请"
parent="yuthon_property_menu"
action="yuthon_property_action"/>
action="property_evaluate_application_action"/>
<menuitem id="yuthon_property_evaluated_menu"
sequence="5"
name="已评估"
@@ -259,7 +259,7 @@
parent="resource_management_menu"
name="配置"
action="yuthon_resource_mgmt_config_action"
sequence="-1"/>
sequence="2"/>
<menuitem id="yuthon_resource_type_menu" parent="resource_mgmt_config_menu" name="资产类型"
action="yuthon_resource_type_action" sequence="10"/>
@@ -282,8 +282,8 @@
<menuitem
id="property_approval_menu"
parent="resource_management_menu"
parent="yuthon_property_menu_root"
name="物业审批"
action="yuthon_property_action"
sequence="2"/>
sequence="50"/>
</odoo>
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id='property_evaluate_application_tree' model='ir.ui.view'>
<field name="name">property.evaluate.application.tree</field>
<field name="model">property.evaluate.application</field>
<field name="arch" type="xml">
<tree string="评估申请">
<field name="name"/>
<field name="code"/>
<field name="is_meet"/>
<field name="is_experts"/>
</tree>
</field>
</record>
<record id='property_evaluate_application_form' model='ir.ui.view'>
<field name="name">property.evaluate.application.form</field>
<field name="model">property.evaluate.application</field>
<field name="arch" type="xml">
<form string="评估申请">
<sheet>
<group col="3">
<group>
<field name="code"/>
</group>
<group>
<field name="is_meet"/>
</group>
<group>
<field name="is_experts"/>
</group>
</group>
<group string="审批事项">
<field name="name" required="1"/>
<field name="main_text"/>
<field name="notice_documents_ids" widget="preview_many2many"/>
</group>
<notebook>
<page string="评估项目详情">
<field name="property_message_ids">
<tree editable="bottom">
<field name="property_message_id" column_invisible="1"/>
<field name="property_address" string="评估资产"/>
<field name="rentable_area" string="评估面积m²"/>
<field name="assessment_category" string="评估类别"/>
<field name="owner"/>
<field name="registered_use"/>
<field name="rental_use" string="设定用途"/>
<field name="current_status"/>
<field name="unit_price" string="上一手历史租金单价" help="(元/m².月)"/>
<field name="rental_conditions" string="出租条件"/>
<field name="remarks" string="备注"/>
<field name="gov_rent_price" column_invisible="1"/>
<field name="evaluation_rent_price" column_invisible="1"/>
<field name="evaluation_rent_total" column_invisible="1"/>
<field name="evaluation_whole_rent_price" column_invisible="1"/>
<field name="evaluation_whole_rent_total" column_invisible="1"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="property_evaluate_application_action" model="ir.actions.act_window">
<field name="name">物业评估申请</field>
<field name="res_model">property.evaluate.application</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id= "view_property_rental_form_tree" model="ir.ui.view">
<field name="name">property.rental.form.tree</field>
<field name="model">property.rental.form</field>
<field name="arch" type="xml">
<tree string="出租申报表">
<field name="name"/>
<field name="property_address"/>
<field name="registered_use"/>
<field name="evaluation_area"/>
<field name="current_status"/>
<field name="owner"/>
<field name="now_rent_price"/>
<field name="evaluate_rent_price"/>
<field name="upset_square"/>
<field name="upset"/>
<field name="lease_period"/>
<field name="increment_rate"/>
<field name="rental_use"/>
</tree>
</field>
</record>
<record id="view_property_rental_form_form" model="ir.ui.view">
<field name="name">property.rental.form.form</field>
<field name="model">property.rental.form</field>
<field name="arch" type="xml">
<form string="出租申报表">
<sheet>
<div class="col-12 text-center">
<h1>
<field name="name"/>
</h1>
</div>
<group string="物业信息" col="3">
<group>
<field name="property_address"/>
<field name="property_address"/>
<field name="property_address"/>
</group>
<group>
<field name="property_address"/>
<field name="property_address"/>
</group>
<group>
<field name="property_address"/>
<field name="property_address"/>
</group>
name = fields.Char(string='名称')
property_address = fields.Char(string='物业地址')
registered_use = fields.Char(string='证载用途')
evaluation_area = fields.Float(string='出租面积(m²)')
current_status = fields.Date(string='租聘到期日')
owner = fields.Char(string='原租户')
now_rent_price = fields.Float(string='现租价(元/m² •月)')
evaluate_rent_price = fields.Float(string='评估租(元/m² •月)')
upset_square = fields.Float(string='底价(元/m² •月)')
upset = fields.Float(string='底价(元/月)')
lease_period = fields.Char(string='租凭年限')
increment_rate = fields.Float(string='递增率')
rental_use = fields.Char(string='出租用途')
other = fields.Char(string='其他')
remarks = fields.Text(string='备注')
@@ -59,7 +59,7 @@
</record>
<!-- 已评估物业-->
rental_form
<record id="yuthon_property_evaluation_view_tree2" model="ir.ui.view">
<field name="name">yuthon_property_evaluation_view_tree</field>
+10 -18
View File
@@ -39,9 +39,6 @@
<field name="arch" type="xml">
<form string="资产信息">
<sheet>
<field name="image_1920" widget="image" class="oe_avatar"
optional="{'preview_image': 'image_128'}"/>
<group string="基本信息">
<group>
<field name="name" required="1"/>
@@ -56,13 +53,14 @@
<field name="property_source"/>
<field name="remark"/>
<field name="vr_link"/>
<field name="other_materials"/>
<field name="notice_documents_ids" widget="preview_many2many"/>
</group>
<group>
<field name="image_1920" widget="image" class="oe_avatar"
optional="{'preview_image': 'image_128'}"/>
<field name="abbreviation"/>
<field name="property_floor"/>
<field name="property_orientation"/>
<field name="street"/>
<field name="property_area"/>
<field name="pooled_area"/>
@@ -71,11 +69,9 @@
<field name="state_id"/>
<field name="is_meter"/>
<field name="is_electricity_meter"/>
</group>
</group>
<group string="属性价值" col="1">
<group col="2">
<group string="属性价值" col="2">
<group>
<field name="company_page"/>
<field name="admin_id"/>
@@ -92,15 +88,12 @@
<field name="is_handle_land"/>
</group>
</group>
<group col="2">
<group>
<field name="life_timer"/>
</group>
<group>
<div>
<field name="property_use_time"/>
</div>
</group>
<group col="2">
<group>
<field name="life_timer"/>
</group>
<group>
<field name="property_use_time"/>
</group>
</group>
<group string="招商信息">
@@ -208,7 +201,6 @@
<field name="search_view_id" ref="yuthon_property_search"/>
</record>
<record id="view_yuthon_property_water_tree" model="ir.ui.view">
<field name="name">yuthon.property.water.tree</field>
<field name="model">yuthon.property.water</field>
@@ -1,24 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_yuthon_resource_mgmt_config_tree" model="ir.ui.view">
<field name="name">yuthon.resource.mgmt.config.tree</field>
<field name="model">yuthon.resource.mgmt.config</field>
<field name="arch" type="xml">
<tree editable="bottom">
<field name="asset_type_id"/>
<field name="house_type_id"/>
<field name="purpose_id"/>
<field name="mgmt_type_id"/>
<field name="billing_type_id"/>
</tree>
</field>
</record>
<record id="yuthon_resource_mgmt_config_action" model="ir.actions.act_window">
<field name="name">资源管理配置</field>
<field name="res_model">yuthon.resource.mgmt.config</field>
<field name="view_mode">tree</field>
</record>
<record id="view_yuthon_resource_type_tree" model="ir.ui.view">
<field name="name">yuthon.resource.type.tree</field>
+5
View File
@@ -672,6 +672,11 @@
name="员工绩效"
sequence="5"
action="yuthon_performance.yuthon_employee_performance_action"/>
<menuitem id="yuthon_tissue_duty_approval_menu_board"
name="组织绩效变更申请"
parent="yuthon_performance_duty_menu_board"
sequence="7"
action="yuthon_performance.yuthon_tissue_duty_approval_action"/>
<menuitem id="yuthon_plan_management_board"
parent="yuthon_performance_menu_config_root_board"
name="个人工作任务"