103 lines
4.3 KiB
Python
103 lines
4.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
from odoo import api, fields, models, tools, _
|
|
|
|
|
|
class ApprovalRequest(models.Model):
|
|
_inherit = 'approval.request'
|
|
_description = '常用字段'
|
|
|
|
main_text = fields.Text(string='正文')
|
|
urgency = fields.Selection([('normal', '一般'),
|
|
('urgent', '紧急'),
|
|
('extra_urgent', '特急')],
|
|
string="紧急程度")
|
|
business_type = fields.Selection([
|
|
('agreement', '协议(合同)'),
|
|
('staff administration', '人事行政'),
|
|
('finance', '财务'),
|
|
('company business', '公司业务'),
|
|
('subordinate business', '下属单位业务'),
|
|
('trade union', '工会'),
|
|
('leak repairing', '补漏'),
|
|
('other', '其他'),
|
|
], string="业务类型")
|
|
remarks = fields.Char(string="备注事项")
|
|
secret_level = fields.Selection([('normal', '一般'), ('urgent', '秘密'),
|
|
('secret', '机密'), ('so_secret', '绝密')], string="密级")
|
|
main_flats = fields.Char(string="主送")
|
|
cp_flats = fields.Char(string="抄送")
|
|
topic = fields.Char(string='议题')
|
|
lessee = fields.Char(string="承租方")
|
|
contract_id = fields.Char(string="合同编号")
|
|
servings_number = fields.Integer(string="份数")
|
|
duration = fields.Char(string="时长")
|
|
job_id = fields.Many2one('hr.job', string="岗位")
|
|
date_start = fields.Datetime(string="开始时间")
|
|
date_end = fields.Datetime(string="结束时间")
|
|
form_employment = fields.Selection([('exercitation', '实习'),
|
|
('expatriate', '外派'),
|
|
('tryout', '试用'),
|
|
('official', '正式'),
|
|
], string="聘用形式")
|
|
approval_sex = fields.Selection([('girl', '女'), ('boy', '男')], string="性别")
|
|
entry_time = fields.Datetime(string="入职时间")
|
|
reason_application = fields.Char(string="申请事由")
|
|
stamp_class = fields.Selection([('union_chapter', '工会章'),
|
|
('legal_person_chapter', '法人章'),
|
|
('common_chapter', '公章'),
|
|
('dzy_chapter', '党支委'),
|
|
('financial_chapter', '财务章'),
|
|
('other_chapter', '其他'),
|
|
], string="用章类别")
|
|
creation_time = fields.Datetime(string='创建时间', default=lambda self: fields.Datetime.now())
|
|
department_id = fields.Many2one('hr.department', related="request_owner_id.employee_id.department_id", string="申请人部门")
|
|
approval_request_ids = fields.One2many('approval.request.line', 'approval_request_id', string="审批明细行")
|
|
partner_id = fields.Many2one('res.partner', string="来文单位")
|
|
|
|
|
|
|
|
class ApprovalRequestLine(models.Model):
|
|
_name = 'approval.request.line'
|
|
_description = '明细行'
|
|
|
|
approval_request_id = fields.Many2one('approval.request', string="关联审批单")
|
|
|
|
# 董事会议题申报表
|
|
topic = fields.Char(string='议题')
|
|
|
|
# 租赁合同呈批表
|
|
unit_price = fields.Char(string="单价")
|
|
rent = fields.Char(string="租金")
|
|
date_start = fields.Datetime(string="开始时间")
|
|
date_end = fields.Datetime(string="结束时间")
|
|
|
|
# 工程立项
|
|
property_name = fields.Char(string='物业名称')
|
|
area = fields.Char(string='面积')
|
|
property_id = fields.Char(string='物业ID')
|
|
project_flow = fields.Char(string='项目流水号')
|
|
|
|
# 物业管理变更申请表
|
|
subordinate_companies = fields.Char(string="所属公司")
|
|
administrator = fields.Char(string="管理员")
|
|
district = fields.Char(string="片区")
|
|
manage_type = fields.Char(string="管理类型")
|
|
|
|
# 固定资产采购单
|
|
name = fields.Char(string="名称")
|
|
servings_number = fields.Integer(string="份数")
|
|
subtotal = fields.Integer(string="小计")
|
|
unit = fields.Char(string="单位")
|
|
detail = fields.Char(string="详情")
|
|
|
|
# 建设工程审批单
|
|
payment_scheduling = fields.Char(string="支付进度")
|
|
percentage = fields.Char(string="百分比")
|
|
money = fields.Char(string="金额")
|
|
|
|
# 加班
|
|
|
|
|
|
|
|
|