pengyuthon

This commit is contained in:
李鹏宇
2024-10-24 15:47:55 +08:00
parent 5d69a9baf5
commit 808a0e67eb
17 changed files with 387 additions and 7 deletions
@@ -63,3 +63,5 @@ th:hover .fa-thumb-tack,
th.clicked-header .fa-thumb-tack {
display: block;
}
//.o_input:hover{background: #b3c8df!important;}
@@ -7,7 +7,7 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='work_email']" position="after">
<field name="user_role_id"/>
<field name="user_role_ids" widget="many2many_tags" force_save="1"/>
<field name="user_role_ids" widget="many2many_tags"/>
</xpath>
</field>
</record>
+6 -1
View File
@@ -12,6 +12,11 @@
'data/data_yuthon_resource_mgmt_config.xml',
'views/yuthon_property_views.xml',
'views/property_type_views.xml',
'views/property_patrol_duty.xml',
'views/property_patrol_plan.xml',
'views/property_route_management.xml',
'views/property_patrol_position.xml',
'views/property_patrol_standard.xml',
'views/yuthon_draw_result_views.xml',
'views/yuthon_expert_database_views.xml',
'views/yuthon_resource_mgmt_config_views.xml',
@@ -19,7 +24,7 @@
'views/menuitem.xml',
],
'demo': [],
'depends': ['mail'],
'depends': ['mail','documents','soong_workflow'],
'installable': True,
'application': True,
}
+5
View File
@@ -1,5 +1,10 @@
from . import yuthon_property
from . import property_type
from . import property_patrol_duty
from . import property_patrol_plan
from . import property_patrol_position
from . import property_patrol_standard
from . import property_route_management
from . import yuthon_resource_mgmt_config
from . import yuthon_draw_result
from . import yuthon_expert_database
@@ -0,0 +1,25 @@
from odoo import models, fields, api
class PropertyPatrolDuty(models.Model):
_name = 'property.patrol.duty'
_description = '巡更任务'
number = fields.Integer(string='序号')
task_number = fields.Char(string='任务编号')
task_category = fields.Char(string='任务类别')
route_name = fields.Char(string='路线名称')
people = fields.Char(string='责任人')
scheduled_time = fields.Datetime(string='计划巡检时间')
task_status = fields.Selection([('all_tasks', '全部任务'), ('not_started', '未开始'),
('ing', '进行中'), ('ed', '已完成'),
('overtime', '超时关闭'), ('void', '已作废')], string='任务状态')
timeout_cause = fields.Char(string='超时原因')
create_date = fields.Date(string="开工时间")
end_date = fields.Date(string="完工时间")
point_random = fields.Char(string='点位随机')
inspection_completion = fields.Char(string='巡检完成率')
inspection_schedule = fields.Char(string='巡检进度')
controls = fields.Char(string='操作')
@@ -0,0 +1,18 @@
from odoo import models, fields, api
class PropertyPatrolPlan(models.Model):
_name = 'property.patrol.plan'
_description = '巡更计划'
plan_name = fields.Char(string='计划名称')
plan_category = fields.Char(string='计划类型')
people = fields.Char(string='巡检责任人')
time = fields.Integer(string='巡检周期')
start_date = fields.Date(string="生效日")
end_date = fields.Date(string="失效日")
generation_number = fields.Integer(string='任务生成数')
completed_number = fields.Integer(string='任务完成数')
founder = fields.Char(string='创建人/时间')
controls = fields.Char(string='操作')
@@ -0,0 +1,19 @@
from odoo import models, fields, api
class PropertyPatrolPosition(models.Model):
_name = 'property.patrol.position'
_description = '巡更点位'
number = fields.Integer(string='序号')
point_number = fields.Char(string='点位编号')
point_name = fields.Char(string='点位名称')
external_coding = fields.Char(string='外部编码')
position = fields.Char(string='具体位置')
adapt_work = fields.Char(string='适应岗位')
founder = fields.Char(string='创建人/时间')
clock_in = fields.Boolean(string='扫码签到')
picture = fields.Boolean(string='强制拍照')
outside = fields.Char(string='外部二维码')
code_management = fields.Char(string='二维码管理')
controls = fields.Char(string='操作')
@@ -0,0 +1,18 @@
from odoo import models, fields, api
class PropertyPatrolStandard(models.Model):
_name = 'property.patrol.standard'
_description = '巡更标准'
number = fields.Integer(string='序号')
task_number = fields.Char(string='任务编号')
question_type = fields.Char(string='题类型')
check_item = fields.Selection([('sweep_floor', '扫地拖地'), ('gate', '看大门'), ('Back door', '看后门')], string='检查顶')
title = fields.Selection([('cleaning', '保洁卫生'), ('gate', '看大门'), ('back_door', '看后门')], string='标题')
check_details = fields.Selection([('gate', '看大门'), ('back_door', '看后门')], string='检查明细')
result_option = fields.Selection([('ood', '好'), ('normal', '一般'), ('bad', '差')], string='检查明细')
people = fields.Char(string='创建人')
time = fields.Datetime(string='时间')
ed_time = fields.Datetime(string='最后修改')
controls = fields.Char(string='操作')
@@ -0,0 +1,13 @@
from odoo import models, fields, api
class PropertyRouteManagement(models.Model):
_name = 'property.route.management'
_description = '路线管理'
number = fields.Integer(string='序号')
patrol_types = fields.Char(string='安防巡更类型')
route_sequence = fields.Char(string='路线顺序')
patrol_number = fields.Integer(string='巡更点数量')
founder = fields.Char(string='创建人/时间')
controls = fields.Char(string='操作')
+5 -1
View File
@@ -1,7 +1,11 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_yuthon_property,yuthon_property,model_yuthon_property,base.group_user,1,1,1,1
access_property_type,property_type,model_property_type,base.group_user,1,1,1,1
access_property_patrol_duty,property_patrol_duty,model_property_patrol_duty,base.group_user,1,1,1,1
access_property_patrol_plan,property_patrol_plan,model_property_patrol_plan,base.group_user,1,1,1,1
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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_yuthon_property yuthon_property model_yuthon_property base.group_user 1 1 1 1
3 access_property_type property_type model_property_type base.group_user 1 1 1 1
4 access_yuthon_draw_result access_property_patrol_duty yuthon.draw.result property_patrol_duty model_yuthon_draw_result model_property_patrol_duty base.group_user 1 1 1 1
5 access_property_patrol_plan property_patrol_plan model_property_patrol_plan base.group_user 1 1 1 1
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_expert_database access_yuthon_draw_result yuthon.expert.database yuthon.draw.result model_yuthon_expert_database model_yuthon_draw_result base.group_user 1 1 1 1
10 access_yuthon_property_water access_yuthon_expert_database yuthon.property.water yuthon.expert.database model_yuthon_property_water model_yuthon_expert_database base.group_user 1 1 1 1
11 access_yuthon_property_energy access_yuthon_property_water yuthon.property.energy yuthon.property.water model_yuthon_property_energy model_yuthon_property_water base.group_user 1 1 1 1
+27 -2
View File
@@ -21,7 +21,7 @@
sequence="1"
name="待评估"
parent="yuthon_property_menu"
action="yuthon_property_evaluation_action1"/>
action="property_assess_action"/>
<menuitem id="yuthon_property_evaluate_application_menu"
sequence="3"
name="评估申请"
@@ -174,7 +174,7 @@
<menuitem id="yuthon_security_inspection_menu"
sequence="15"
name="安全巡检"
name="安全巡检(二期)"
parent="yuthon_property_menu_root"
action="property_assess_action"/>
<menuitem id="yuthon_property_schedule_tasks"
@@ -196,6 +196,31 @@
name="配置"
parent="yuthon_property_schedule_tasks"
action="property_assess_action"/>
<menuitem id="yuthon_property_patrol_duty"
sequence="7"
name="巡更任务"
parent="yuthon_security_inspection_menu"
action="property_patrol_duty"/>
<menuitem id="yuthon_property_patrol_plan"
sequence="9"
name="巡更计划"
parent="yuthon_security_inspection_menu"
action="property_patrol_plan"/>
<menuitem id="yuthon_property_route_management"
sequence="11"
name="路线管理"
parent="yuthon_security_inspection_menu"
action="property_route_management"/>
<menuitem id="yuthon_property_patrol_position"
sequence="13"
name="巡更点位"
parent="yuthon_security_inspection_menu"
action="property_patrol_position"/>
<menuitem id="yuthon_property_patrol_standard"
sequence="15"
name="巡更标准"
parent="yuthon_security_inspection_menu"
action="property_patrol_standard"/>
<menuitem id="yuthon_customer_service_menu"
sequence="17"
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_property_patrol_duty_tree" model="ir.ui.view">
<field name="name">property.patrol.duty.tree</field>
<field name="model">property.patrol.duty</field>
<field name="arch" type="xml">
<tree string="巡更任务" editable="bottom">
<field name="number"/>
<field name="task_number"/>
<field name="task_category"/>
<field name="route_name"/>
<field name="people"/>
<field name="scheduled_time"/>
<field name="task_status"/>
<field name="timeout_cause"/>
<field name="create_date"/>
<field name="end_date"/>
<field name="point_random"/>
<field name="inspection_completion"/>
<field name="inspection_schedule"/>
<field name="controls"/>
</tree>
</field>
</record>
<record id="property_patrol_duty_form" model="ir.ui.view">
<field name="name">property.patrol.duty.form</field>
<field name="model">property.patrol.duty</field>
<field name="arch" type="xml">
<form string="巡更任务">
<sheet>
<group>
<field name="number"/>
<field name="task_number"/>
<field name="task_category"/>
<field name="route_name"/>
<field name="people"/>
<field name="scheduled_time"/>
<field name="task_status"/>
<field name="timeout_cause"/>
<field name="create_date"/>
<field name="end_date"/>
<field name="point_random"/>
<field name="inspection_completion"/>
<field name="inspection_schedule"/>
<field name="controls"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="property_patrol_duty" model="ir.actions.act_window">
<field name="name">巡更任务</field>
<field name="res_model">property.patrol.duty</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_property_patrol_plan_tree" model="ir.ui.view">
<field name="name">property.patrol.plan.tree</field>
<field name="model">property.patrol.plan</field>
<field name="arch" type="xml">
<tree string="巡更计划" editable="bottom">
<field name="plan_name"/>
<field name="plan_category"/>
<field name="people"/>
<field name="time"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="generation_number"/>
<field name="completed_number"/>
<field name="founder"/>
<field name="controls"/>
</tree>
</field>
</record>
<record id="property_patrol_plan_form" model="ir.ui.view">
<field name="name">property.patrol.plan.form</field>
<field name="model">property.patrol.plan</field>
<field name="arch" type="xml">
<form string="巡更计划">
<sheet>
<group>
<field name="plan_name"/>
<field name="plan_category"/>
<field name="people"/>
<field name="time"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="generation_number"/>
<field name="completed_number"/>
<field name="founder"/>
<field name="controls"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="property_patrol_plan" model="ir.actions.act_window">
<field name="name">巡更计划</field>
<field name="res_model">property.patrol.plan</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_property_patrol_position_tree" model="ir.ui.view">
<field name="name">property.patrol.position.tree</field>
<field name="model">property.patrol.position</field>
<field name="arch" type="xml">
<tree string="巡更点位" editable="bottom">
<field name="number"/>
<field name="point_number"/>
<field name="point_name"/>
<field name="external_coding"/>
<field name="position"/>
<field name="adapt_work"/>
<field name="founder"/>
<field name="clock_in"/>
<field name="picture"/>
<field name="outside"/>
<field name="code_management"/>
<field name="controls"/>
</tree>
</field>
</record>
<record id="property_patrol_position_form" model="ir.ui.view">
<field name="name">property.patrol.position.form</field>
<field name="model">property.patrol.position</field>
<field name="arch" type="xml">
<form string="巡更点位">
<sheet>
<group>
<field name="number"/>
<field name="point_number"/>
<field name="point_name"/>
<field name="external_coding"/>
<field name="position"/>
<field name="adapt_work"/>
<field name="founder"/>
<field name="clock_in"/>
<field name="picture"/>
<field name="outside"/>
<field name="code_management"/>
<field name="controls"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="property_patrol_position" model="ir.actions.act_window">
<field name="name">巡更点位</field>
<field name="res_model">property.patrol.position</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_property_patrol_standard_tree" model="ir.ui.view">
<field name="name">property.patrol.standard.tree</field>
<field name="model">property.patrol.standard</field>
<field name="arch" type="xml">
<tree string="巡更标准" editable="bottom">
<field name="number"/>
<field name="task_number"/>
<field name="question_type"/>
<field name="check_item"/>
<field name="title"/>
<field name="check_details"/>
<field name="result_option"/>
<field name="people"/>
<field name="time"/>
<field name="ed_time"/>
<field name="controls"/>
</tree>
</field>
</record>
<record id="property_patrol_standard_form" model="ir.ui.view">
<field name="name">property.patrol.standard.form</field>
<field name="model">property.patrol.standard</field>
<field name="arch" type="xml">
<form string="巡更标准">
<sheet>
<group>
<field name="number"/>
<field name="task_number"/>
<field name="question_type"/>
<field name="check_item"/>
<field name="title"/>
<field name="check_details"/>
<field name="result_option"/>
<field name="people"/>
<field name="time"/>
<field name="ed_time"/>
<field name="controls"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="property_patrol_standard" model="ir.actions.act_window">
<field name="name">巡更标准</field>
<field name="res_model">property.patrol.standard</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_property_route_management_tree" model="ir.ui.view">
<field name="name">property.route.management.tree</field>
<field name="model">property.route.management</field>
<field name="arch" type="xml">
<tree string="路线管理" editable="bottom">
<field name="number"/>
<field name="patrol_types"/>
<field name="route_sequence"/>
<field name="patrol_number"/>
<field name="founder"/>
<field name="controls"/>
</tree>
</field>
</record>
<record id="property_route_management_form" model="ir.ui.view">
<field name="name">property.route.management.form</field>
<field name="model">property.route.management</field>
<field name="arch" type="xml">
<form string="路线管理">
<sheet>
<group>
<field name="number"/>
<field name="patrol_types"/>
<field name="route_sequence"/>
<field name="patrol_number"/>
<field name="founder"/>
<field name="controls"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="property_route_management" model="ir.actions.act_window">
<field name="name">路线管理</field>
<field name="res_model">property.route.management</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>
+2 -2
View File
@@ -453,11 +453,11 @@
parent="holiday_set_menu_board"
action="hr_holidays.open_view_accrual_plans"
sequence="3"/>
<menuitem id="holiday_management_allocation_board"
<menuitem id="holiday_management_allocation_board"
name="假期分配"
parent="holiday_set_menu_board"
action="hr_holidays.hr_leave_allocation_action_approve_department"
sequence="3"/>
sequence="5"/>
<menuitem id="holiday_set_vacation_board"
name="公共假期"
parent="holiday_set_menu_board"