添加功能
This commit is contained in:
@@ -13,7 +13,11 @@
|
||||
'depends': ['documents'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/lessee_service_setting_views.xml',
|
||||
'views/property_report_repair.xml',
|
||||
'views/yuthon_maintain_service_views.xml',
|
||||
'views/maintenance_equipment_views.xml',
|
||||
'views/all_menu.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'application': True,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import inherit_maintenance_equipment
|
||||
from . import lessee_service_setting
|
||||
from . import property_report_repair
|
||||
from . import yuthon_maintain_service
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, fields, api, exceptions, _
|
||||
|
||||
|
||||
class SoftwareIssuesSetting(models.Model):
|
||||
_name = 'software.issues.setting'
|
||||
_description = '软件问题'
|
||||
|
||||
name = fields.Char(string='软件问题')
|
||||
|
||||
|
||||
class HardwareIssuesSetting(models.Model):
|
||||
_name = 'hardware.issues.setting'
|
||||
_description = '硬件问题'
|
||||
|
||||
name = fields.Char(string='硬件问题')
|
||||
|
||||
|
||||
class SoftwareIssuesProcessing(models.Model):
|
||||
_name = 'software.issues.processing'
|
||||
_description = '软件处理类型'
|
||||
|
||||
name = fields.Char(string='软件处理方式')
|
||||
|
||||
|
||||
class HardwareIssuesProcessing(models.Model):
|
||||
_name = 'hardware.issues.processing'
|
||||
_description = '硬件处理类型'
|
||||
|
||||
name = fields.Char(string='硬件处理方式')
|
||||
|
||||
|
||||
class MaintainServiceSetting(models.Model):
|
||||
_name = 'maintain.service.setting'
|
||||
_description = '服务器类型'
|
||||
|
||||
name = fields.Char(string='服务器类型')
|
||||
|
||||
|
||||
class MaintainDesktopSetting(models.Model):
|
||||
_name = 'maintain.desktop.setting'
|
||||
_description = '桌面类型'
|
||||
|
||||
name = fields.Char(string='桌面类型')
|
||||
@@ -0,0 +1,58 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, fields, api, exceptions, _
|
||||
|
||||
class PropertyRentRelief(models.Model):
|
||||
_name = 'property.report.repair'
|
||||
_description = '报事报修审批'
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_rec_name = 'name'
|
||||
|
||||
name = fields.Char(string='标题')
|
||||
code = fields.Char(string="报修编号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('property_report_repair_code'))
|
||||
users_id = fields.Many2one('res.users', string="报修人", default=lambda self: self.env.user.id)
|
||||
repairer_date = fields.Date(string="报修时间")
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="报修部门")
|
||||
repairer_address = fields.Char(string="报修人地址")
|
||||
fault = fields.Text(string="故障信息")
|
||||
|
||||
dispatch_date = fields.Date(string="派单时间")
|
||||
dispatch_head_id = fields.Many2one('hr.employee', string="派单人负责人")
|
||||
team_ids = fields.Many2many('hr.employee', string="维修团队")
|
||||
completion_time = fields.Datetime(string="预计完成时间")
|
||||
dispatch_notes = fields.Text(string="派单备注")
|
||||
|
||||
urgency = fields.Selection([('low', '低'), ('middle', '中'), ('high', '高')], string="紧急程度")
|
||||
possible_causes = fields.Selection([('software', '软件问题'), ('hardware', '硬件问题')], string="可能原因")
|
||||
software_id = fields.Many2one('software.issues.setting', string="具体软件问题")
|
||||
hardware_id = fields.Many2one('hardware.issues.setting', string="具体硬件问题")
|
||||
specific_reasons = fields.Text(string="具体原因")
|
||||
software_processing_id = fields.Many2one('software.issues.processing', string="处理类型")
|
||||
hardware_processing_id = fields.Many2one('hardware.issues.processing', string="处理类型")
|
||||
resolution = fields.Text(string="解决方法")
|
||||
documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
fees = fields.Float(string="费用")
|
||||
repair_company = fields.Char(string="维修人/公司")
|
||||
list_quotations = fields.Many2one('ir.attachment', string="报价清单")
|
||||
invoice_id = fields.Many2one('ir.attachment', string="发票附件")
|
||||
|
||||
hardware_parts = fields.Char(string="更换部件")
|
||||
hardware_fee = fields.Float(string="部件费用")
|
||||
|
||||
software_parts = fields.Char(string="软件名称/版本")
|
||||
software_fee = fields.Float(string="软件费用")
|
||||
|
||||
duration_service = fields.Float(string="服务时长")
|
||||
service_fee = fields.Float(string="服务费")
|
||||
service_fee_total = fields.Float(string="总费用")
|
||||
service_fee_remark = fields.Text(string="费用备注")
|
||||
situation = fields.Char(string="现场说明情况")
|
||||
is_fee = fields.Boolean(string="是否产生费用")
|
||||
labor_costs = fields.Float(string="人工费")
|
||||
confirmation_repairer = fields.Char(string="报修人确认")
|
||||
warehouse_management = fields.Char(string="库管")
|
||||
total = fields.Float(string="总价")
|
||||
|
||||
remake = fields.Text(string="备注")
|
||||
@@ -0,0 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, fields, api, exceptions, _
|
||||
|
||||
|
||||
class YuthonMaintainDesktop(models.Model):
|
||||
_name = 'yuthon.maintain.desktop'
|
||||
_description = '桌面设置'
|
||||
|
||||
name = fields.Char(string='名称')
|
||||
desktop_id = fields.Many2one('maintain.desktop.setting', string='类型')
|
||||
mac_address = fields.Char(string='MAC地址')
|
||||
ip_address = fields.Char(string='IP地址')
|
||||
cpu = fields.Char(string='CPU')
|
||||
memory = fields.Char(string='内存')
|
||||
hard_disk = fields.Char(string='硬盘')
|
||||
account = fields.Char(string='账号')
|
||||
password = fields.Char(string='密码')
|
||||
desktop_type = fields.Char(string='类型')
|
||||
purchase_date = fields.Date(string='购买日期')
|
||||
users_id = fields.Many2one('res.users', string='使用人')
|
||||
remake = fields.Text(string='备注日志')
|
||||
qr_Image = fields.Image(string='二维码')
|
||||
@@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, fields, api, exceptions, _
|
||||
|
||||
|
||||
class YuthonMaintainService(models.Model):
|
||||
_name = 'yuthon.maintain.service'
|
||||
_description = '服务器类'
|
||||
|
||||
name = fields.Char(string='名称', required=True)
|
||||
service_type_id = fields.Many2one('maintain.service.setting', string='服务器类型')
|
||||
mac_address = fields.Char(string='MAC地址')
|
||||
ip_address = fields.Char(string='IP地址')
|
||||
time_purchase = fields.Date(string='购买时间')
|
||||
service_state = fields.Char(string='状态')
|
||||
remake = fields.Text(string='备注日志')
|
||||
updated = fields.Datetime(string='更新时间')
|
||||
qr_Image = fields.Image(string='二维码')
|
||||
@@ -1,2 +1,9 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_property_report_repair,property_report_repair,model_property_report_repair,base.group_user,1,1,1,1
|
||||
access_software_issues_setting,software_issues_setting,model_software_issues_setting,base.group_user,1,1,1,1
|
||||
access_hardware_issues_setting,hardware_issues_setting,model_hardware_issues_setting,base.group_user,1,1,1,1
|
||||
access_software_issues_processing,software_issues_processing,model_software_issues_processing,base.group_user,1,1,1,1
|
||||
access_hardware_issues_processing,hardware_issues_processing,model_hardware_issues_processing,base.group_user,1,1,1,1
|
||||
access_maintain_service_setting,maintain_service_setting,model_maintain_service_setting,base.group_user,1,1,1,1
|
||||
access_maintain_desktop_setting,maintain_desktop_setting,model_maintain_desktop_setting,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
|
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<menuitem id="yuthon_property_report_repair"
|
||||
parent="maintenance.menu_maintenance_title"
|
||||
name="报事报修"
|
||||
action="property_report_repair_action"
|
||||
sequence="1"/>
|
||||
|
||||
<menuitem id="yuthon_maintenance_equipment_menu"
|
||||
parent="maintenance.menu_maintenance_title"
|
||||
name="设备"
|
||||
sequence="5"/>
|
||||
<menuitem id="yuthon_maintenance_equipment_category_menu"
|
||||
parent="yuthon_maintenance_equipment_menu"
|
||||
action="hr_equipment_action"
|
||||
name="设备"
|
||||
sequence="1"/>
|
||||
<menuitem id="yuthon_maintain_desktop_menu"
|
||||
parent="yuthon_maintenance_equipment_menu"
|
||||
action="view_yuthon_maintain_desktop_action"
|
||||
name="桌面"
|
||||
sequence="5"/>
|
||||
<menuitem id="yuthon_maintain_service_menu"
|
||||
parent="yuthon_maintenance_equipment_menu"
|
||||
action="view_yuthon_maintain_service_action"
|
||||
name="服务"
|
||||
sequence="10"/>
|
||||
<!--配置-->
|
||||
<menuitem id="yuthon_software_issues_setting"
|
||||
parent="maintenance.menu_maintenance_configuration"
|
||||
name="软件问题"
|
||||
action="view_software_issues_setting_action"
|
||||
sequence="1"/>
|
||||
<menuitem id="yuthon_hardware_issues_setting"
|
||||
parent="maintenance.menu_maintenance_configuration"
|
||||
name="硬件问题"
|
||||
action="view_hardware_issues_setting_action"
|
||||
sequence="5"/>
|
||||
<menuitem id="yuthon_software_issues_processing"
|
||||
parent="maintenance.menu_maintenance_configuration"
|
||||
name="软件处理类型"
|
||||
action="view_software_issues_processing_action"
|
||||
sequence="10"/>
|
||||
<menuitem id="yuthon_hardware_issues_processing"
|
||||
parent="maintenance.menu_maintenance_configuration"
|
||||
name="硬件处理类型"
|
||||
action="view_hardware_issues_processing_action"
|
||||
sequence="15"/>
|
||||
<menuitem id="yuthon_maintain_service_type_setting"
|
||||
parent="maintenance.menu_maintenance_configuration"
|
||||
name="服务器类型"
|
||||
action="view_yuthon_maintain_service_setting_action"
|
||||
sequence="20"/>
|
||||
<menuitem id="yuthon_maintain_desktop_type_setting"
|
||||
parent="maintenance.menu_maintenance_configuration"
|
||||
name="桌面类型"
|
||||
action="view_yuthon_maintain_desktop_setting_action"
|
||||
sequence="25"/>
|
||||
</odoo>
|
||||
@@ -0,0 +1,86 @@
|
||||
<odoo>
|
||||
<record id="view_software_issues_setting_tree" model="ir.ui.view">
|
||||
<field name="name">software issues setting</field>
|
||||
<field name="model">software.issues.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_software_issues_setting_action" model="ir.actions.act_window">
|
||||
<field name="name">软件问题</field>
|
||||
<field name="res_model">software.issues.setting</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="view_hardware_issues_setting_tree" model="ir.ui.view">
|
||||
<field name="name">hardware issues setting</field>
|
||||
<field name="model">hardware.issues.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_hardware_issues_setting_action" model="ir.actions.act_window">
|
||||
<field name="name">硬件问题</field>
|
||||
<field name="res_model">hardware.issues.setting</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="view_software_issues_processing_tree" model="ir.ui.view">
|
||||
<field name="name">software issues processing</field>
|
||||
<field name="model">software.issues.processing</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_software_issues_processing_action" model="ir.actions.act_window">
|
||||
<field name="name">软件处理类型</field>
|
||||
<field name="res_model">software.issues.processing</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="view_hardware_issues_processing_tree" model="ir.ui.view">
|
||||
<field name="name">hardware issues processing</field>
|
||||
<field name="model">hardware.issues.processing</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_hardware_issues_processing_action" model="ir.actions.act_window">
|
||||
<field name="name">硬件处理类型</field>
|
||||
<field name="res_model">hardware.issues.processing</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="view_yuthon_maintain_desktop_setting_tree" model="ir.ui.view">
|
||||
<field name="name">maintain.desktop.setting</field>
|
||||
<field name="model">maintain.desktop.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_maintain_desktop_setting_action" model="ir.actions.act_window">
|
||||
<field name="name">桌面类型设置</field>
|
||||
<field name="res_model">_setting</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="view_yuthon_maintain_service_setting_tree" model="ir.ui.view">
|
||||
<field name="name">maintain.service.setting</field>
|
||||
<field name="model">maintain.service.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_maintain_service_setting_action" model="ir.actions.act_window">
|
||||
<field name="name">服务类型设置</field>
|
||||
<field name="res_model">maintain.service.setting</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_property_report_repair_tree" model="ir.ui.view">
|
||||
<field name="name">property.report.repair.tree</field>
|
||||
<field name="model">property.report.repair</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="报事报修审批">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_property_report_repair_form" model="ir.ui.view">
|
||||
<field name="name">property.report.repair.form</field>
|
||||
<field name="model">property.report.repair</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="报事报修审批">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="code" readonly="1" string="流水号:"/>
|
||||
</group>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" required="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group string="基本信息" col="3">
|
||||
<group>
|
||||
<field name="repairer_date"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="department_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="users_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="故障信息">
|
||||
<field name="fault"/>
|
||||
</group>
|
||||
<group string="派单信息" col="2">
|
||||
<group>
|
||||
<field name="dispatch_date"/>
|
||||
<field name="dispatch_head_id"/>
|
||||
<field name="dispatch_notes"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="team_ids" widget="many2many_tags"/>
|
||||
<field name="completion_time"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="处理信息">
|
||||
<field name="urgency"/>
|
||||
<field name="possible_causes"/>
|
||||
<field name="software_id" invisible="possible_causes == 'software'"/>
|
||||
<field name="hardware_id" invisible="possible_causes == 'hardware'"/>
|
||||
</group>
|
||||
<group string="具体问题详情">
|
||||
<field name="specific_reasons"/>
|
||||
<field name="software_processing_id" invisible="possible_causes == 'software'"/>
|
||||
<field name="hardware_processing_id" invisible="possible_causes == 'hardware'"/>
|
||||
<field name="resolution"/>
|
||||
<field name="documents_ids" widget="many2many_tags"/>
|
||||
<field name="repair_company"/>
|
||||
<field name="fees"/>
|
||||
<field name="list_quotations" widget="many2one_tags"/>
|
||||
<field name="invoice_id" widget="many2one_tags"/>
|
||||
</group>
|
||||
<group string="费用信息">
|
||||
<field name="hardware_parts" invisible="possible_causes == 'hardware'"/>
|
||||
<field name="hardware_fee" invisible="possible_causes == 'hardware'"/>
|
||||
<field name="software_parts" invisible="possible_causes == 'software'"/>
|
||||
<field name="software_fee" invisible="possible_causes == 'software'"/>
|
||||
</group>
|
||||
<group string="人工费用">
|
||||
<field name="duration_service"/>
|
||||
<field name="service_fee"/>
|
||||
<field name="service_fee_total"/>
|
||||
<field name="service_fee_remark"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="remake"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="property_report_repair_action" model="ir.actions.act_window">
|
||||
<field name="name">报事报修审批</field>
|
||||
<field name="res_model">property.report.repair</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,59 @@
|
||||
<odoo>
|
||||
<record id="view_yuthon_maintain_desktop_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.maintain.desktop.tree</field>
|
||||
<field name="model">yuthon.maintain.desktop</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="桌面">
|
||||
<field name="name"/>
|
||||
<field name="desktop_id"/>
|
||||
<field name="account"/>
|
||||
<field name="purchase_date"/>
|
||||
<field name="users_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_maintain_desktop_form" model="ir.ui.view">
|
||||
<field name="name">yuthon.maintain.desktop.form</field>
|
||||
<field name="model">yuthon.maintain.desktop</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="桌面">
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="desktop_id"/>
|
||||
<field name="mac_address"/>
|
||||
<field name="ip_address"/>
|
||||
<field name="cpu"/>
|
||||
<field name="memory"/>
|
||||
<field name="hard_disk"/>
|
||||
<field name="remake"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="account"/>
|
||||
<field name="password"/>
|
||||
<field name="desktop_type"/>
|
||||
<field name="purchase_date"/>
|
||||
<field name="users_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="qr_Image"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_maintain_desktop_action" model="ir.actions.act_window">
|
||||
<field name="name">桌面</field>
|
||||
<field name="res_model">yuthon.maintain.desktop</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<odoo>
|
||||
<record id="view_yuthon_maintain_service_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.maintain.service.tree</field>
|
||||
<field name="model">yuthon.maintain.service</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="服务器类">
|
||||
<field name="name"/>
|
||||
<field name="service_type_id"/>
|
||||
<field name="mac_address"/>
|
||||
<field name="ip_address"/>
|
||||
<field name="service_state"/>
|
||||
</tree>
|
||||
</field> 、
|
||||
</record>
|
||||
<record id="view_yuthon_maintain_service_form" model="ir.ui.view">
|
||||
<field name="name">yuthon.maintain.service.form</field>
|
||||
<field name="model">yuthon.maintain.service</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="服务器类">
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="service_type_id"/>
|
||||
<field name="mac_address"/>
|
||||
<field name="ip_address"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="time_purchase"/>
|
||||
<field name="service_state"/>
|
||||
<field name="updated"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="qr_Image"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_maintain_service_action" model="ir.actions.act_window">
|
||||
<field name="name">服务器类</field>
|
||||
<field name="res_model">yuthon.maintain.service</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -6,7 +6,7 @@ class YuthonCareCondolences(models.Model):
|
||||
_description = '关怀慰问'
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(string='名称')
|
||||
name = fields.Char(string='标题')
|
||||
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
care_type_id = fields.Many2one('yuthon.care.setting', string='类型')
|
||||
|
||||
@@ -6,7 +6,7 @@ class YuthonWorkCondolences(models.Model):
|
||||
_description = '关怀慰问'
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(string='名称')
|
||||
name = fields.Char(string='标题')
|
||||
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
work_type_id = fields.Many2one('yuthon.work.setting', string='类型')
|
||||
|
||||
@@ -20,36 +20,30 @@
|
||||
<group>
|
||||
<field name="code" readonly="1" string="流水号:"/>
|
||||
</group>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group string="个人信息">
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="care_type_id"/>
|
||||
<field name="date"/>
|
||||
<field name="fees"/>
|
||||
<group string="审批事项">
|
||||
<field name="name"/>
|
||||
<field name="users_id"/>
|
||||
<field name="reason"/>
|
||||
</group>
|
||||
<group string="个人信息">
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="care_type_id"/>
|
||||
<field name="date"/>
|
||||
<field name="fees"/>
|
||||
</group>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="marriage_cate_id" widget="preview_many2one"/>
|
||||
<field name="born_cate_id" widget="preview_many2one"/>
|
||||
<field name="discharge_summary_id" widget="preview_many2one"/>
|
||||
<field name="retired_id" widget="preview_many2one"/>
|
||||
</group>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="marriage_cate_id" widget="preview_many2one"/>
|
||||
<field name="born_cate_id" widget="preview_many2one"/>
|
||||
<field name="discharge_summary_id"/>
|
||||
<field name="retired_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="marriage_date"/>
|
||||
<field name="born_date"/>
|
||||
</group>
|
||||
|
||||
</group>
|
||||
<group string="审批事项">
|
||||
<field name="name"/>
|
||||
<field name="reason"/>
|
||||
<group>
|
||||
<field name="marriage_date"/>
|
||||
<field name="born_date"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -20,25 +20,19 @@
|
||||
<group>
|
||||
<field name="code" readonly="1" string="流水号:"/>
|
||||
</group>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group string="个人信息">
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="work_type_id"/>
|
||||
<field name="date"/>
|
||||
<field name="fees"/>
|
||||
</group>
|
||||
<group string="审批事项">
|
||||
<field name="name"/>
|
||||
<field name="reason"/>
|
||||
<field name="scheme_id" widget="preview_many2one"/>
|
||||
<field name="meeting_id" widget="preview_many2one"/>
|
||||
</group>
|
||||
<group string="审批事项">
|
||||
<field name="name"/>
|
||||
<field name="reason"/>
|
||||
<field name="scheme_id" widget="preview_many2one"/>
|
||||
<field name="meeting_id" widget="preview_many2one"/>
|
||||
</group>
|
||||
<group string="个人信息">
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="work_type_id"/>
|
||||
<field name="date"/>
|
||||
<field name="fees"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user