议题管理

This commit is contained in:
李鹏宇
2024-07-13 19:18:17 +08:00
parent 182732bad2
commit 1346d7479b
12 changed files with 84 additions and 55 deletions
+3 -3
View File
@@ -2,9 +2,9 @@
from . import inherit_approval_category
from . import inherit_approval_request
from . import overtime_approval
from . import tianhe_construction_business_approval
from . import tianhe_process_change_approval
from . import tianhe_contentious_matter_approval
# from . import tianhe_construction_business_approval
# from . import tianhe_process_change_approval
# from . import tianhe_contentious_matter_approval
# from . import tianhe_document_processing_approval
# from . import tianhe_property_submission_approval
# from . import tianhe_rental_receipt_approval
@@ -52,6 +52,7 @@ class ApprovalRequest(models.Model):
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="来文单位")
+2 -2
View File
@@ -13,9 +13,9 @@
'depends': ['approvals', 'yuthon_approval', 'mail'],
'data': [
'security/ir.model.access.csv',
'data/approval_category_type_data.xml',
# 'data/approval_category_type_data.xml',
'views/yuthon_ntice_views.xml',
'views/notice_category.xml',
# 'views/notice_category.xml',
],
'installable': True,
'application': True,
+1 -1
View File
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
from . import notice_category
# from . import notice_category
from . import yuthon_notice
+1 -1
View File
@@ -12,7 +12,7 @@
'license': 'LGPL-3',
'depends': ['approvals', 'yuthon_approval', 'mail'],
'data': [
'data/approval_category_type_data.xml',
# 'data/approval_category_type_data.xml',
'security/ir.model.access.csv',
# 'views/tianhe_official_issues.xml',
# 'views/tianhe_official_receipt.xml',
+1 -1
View File
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
from . import yuthon_official
from . import official_category
# from . import official_category
@@ -14,3 +14,25 @@ class ApprovalRequest(models.Model):
_inherit = "approval.request"
_description = '公文管理'
official_ids = fields.Many2one('approval.request')
send_type = fields.Selection([
('official_issues', '公文发文'),
('general_party_branch_post', '党总支发文'),
('party_branch_committee_post', '党支委发文'),
('official_issues_for_son', '公文发文(子企业)'),
('financing_post', '投融资发文'),
('official_account_cloud_sms_post_submission', '公众号/云短信发文呈批'),
('post_submission', '发文呈批'),
], default='official_issues', string="发文类型")
official_type = fields.Selection([('receipt', '收文'), ('post', '发文')], string="公文类型")
reference_cold = fields.Integer(string="公文字号")
major_event_category = fields.Integer(string="重大事项所属类别")
document_number = fields.Char(string="单据编号")
remarks = fields.Char(string="备注事项")
main_text = fields.Text(string='正文')
come_file_id = fields.Char(string="来文编号")
main_flats = fields.Char(string="主送")
urgency = fields.Selection([('normal', '一般'), ('urgent', '紧急'), ('extra_urgent', '特急')], string="紧急程度")
secret_level = fields.Selection([('normal', '一般'), ('urgent', '秘密'), ('secret', '机密'), ('so_secret', '绝密')], string="密级")
date = fields.Datetime(string="日期")
+14 -14
View File
@@ -6,9 +6,11 @@ from odoo.exceptions import ValidationError, UserError
class YuthonOfficial(models.Model):
_name = 'yuthon.official'
_description = '收发文管理'
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
_rec_name = 'name'
name = fields.Char(string="审批单")
official_ids = fields.Many2one('approval.request')
name = fields.Char(string="名称")
official_ids = fields.Many2one('approval.request', string="关联审批单")
send_type = fields.Selection([
('official_issues', '公文发文'),
('general_party_branch_post', '党总支发文'),
@@ -18,23 +20,21 @@ class YuthonOfficial(models.Model):
('official_account_cloud_sms_post_submission', '公众号/云短信发文呈批'),
('post_submission', '发文呈批'),
], default='official_issues', string="发文类型")
reference_cold = fields.Integer(string="发文字号")
official_type = fields.Selection([('receipt', '收文'), ('post', '发文')], string="公文类型")
reference_cold = fields.Integer(string="公文字号")
major_event_category = fields.Integer(string="重大事项所属类别")
document_number = fields.Char(string="单据编号")
come_company_id = fields.Char(string="来文单位")
partner_id = fields.Many2one('res.partner', string="来文单位")
remarks = fields.Char(string="备注事项")
main_text = fields.Text(string='正文')
come_file_id = fields.Char(string="来文编号")
main_flats = fields.Char(string="主送")
servings_number = fields.Integer(string="份数")
urgency = fields.Selection([('normal', '一般'),
('urgent', '紧急'),
('extra_urgent', '特急')],
string="紧急程度")
secret_level = fields.Selection([('normal', '一般'), ('urgent', '秘密'),
('secret', '机密'), ('so_secret', '绝密')], string="密级")
urgency = fields.Selection([('normal', '一般'), ('urgent', '紧急'), ('extra_urgent', '特急')], string="紧急程度")
secret_level = fields.Selection([('normal', '一般'), ('urgent', '秘密'), ('secret', '机密'), ('so_secret', '绝密')], string="密级")
date = fields.Datetime(string="日期")
department_id = fields.Many2one('hr.department',
string="申请人部门")
department_id = fields.Many2one('hr.department', string="申请人部门")
statu = fields.Selection([('drft', '草稿'), ('going', '执行中'), ('cancel', '已取消'), ('done', '已完成')], string="状态")
def go_official_approval(self):
pass
+7
View File
@@ -1,5 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<menuitem
id="send_receive_messages_management_menu"
name="公文管理"
web_icon="yuthon_official,static/description/icon.png"
action="send_receive_messages_management_action"/>
<menuitem
id="send_receive_messages_management_menu2"
parent="send_receive_messages_management_menu"
@@ -8,7 +8,7 @@
<xpath expr="//field[@name='date_confirmed']" position="after">
<field name="document_number"
invisible="send_type not in ['general_party_branch_post','party_branch_committee_post','financing_post']"/>
<field name="come_company_id" invisible="send_type != 'official_issues_for_son'"/>
<field name="partner_id" invisible="send_type != 'official_issues_for_son'"/>
<field name="reference_cold" invisible="send_type != 'post_submission'"/>
<field name="major_event_category" invisible="send_type != 'post_submission'"/>
<field name="send_type"
@@ -7,7 +7,7 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='date_confirmed']" position="after">
<field name="come_file_id" invisible="official_ids.approval_category_name != 'official_receipt'"/>
<field name="come_company_id" invisible="official_ids.approval_category_name != 'official_receipt'"/>
<field name="partner_id" invisible="official_ids.approval_category_name != 'official_receipt'"/>
<field name="main_text" invisible="official_ids.approval_category_name != 'official_receipt'" colspan="3"/>
</xpath>
<xpath expr="//field[@name='company_id']" position="after">
+30 -31
View File
@@ -13,6 +13,9 @@
<tree>
<field name="name"/>
<field name="department_id"/>
<field name="partner_id"/>
<field name="date"/>
<field name="statu"/>
</tree>
</field>
</record>
@@ -22,33 +25,39 @@
<field name="model">yuthon.official</field>
<field name="arch" type="xml">
<form>
<header>
<widget name="attach_document" string="附加文档" action="message_post"/>
<button name="go_official_approval" string="发起申请" type="object" class="oe_highlight"/>
<field name="statu" widget="statusbar"/>
</header>
<sheet>
<div class="oe_title">
<label for="name"/>
<label for="name"/>
<h1>
<field name="name" required="1"/>
</h1>
</div>
<group>
<group>
<field name="official_ids" invisible="1"/>
<field name="document_number"
invisible="send_type not in ['general_party_branch_post','party_branch_committee_post','financing_post']"/>
<field name="come_company_id" invisible="send_type != 'official_issues_for_son'"/>
<field name="reference_cold" invisible="send_type != 'post_submission'"/>
<field name="major_event_category" invisible="send_type != 'post_submission'"/>
<field name="urgency"
invisible="send_type in ['official_account_cloud_sms_post_submission','post_submission']"/>
<field name="secret_level"
invisible="send_type in ['official_account_cloud_sms_post_submission','post_submission']"/>
<field name="date"
invisible="send_type in ['official_account_cloud_sms_post_submission','post_submission']"/>
<field name="send_type"/>
<field name="official_ids" invisible="1"/>
<field name="document_number"
invisible="send_type not in ['general_party_branch_post','party_branch_committee_post','financing_post']"/>
<field name="partner_id" invisible="send_type != 'official_issues_for_son'"/>
<field name="reference_cold" invisible="send_type != 'post_submission'"/>
<field name="major_event_category" invisible="send_type != 'post_submission'"/>
<field name="urgency"
invisible="send_type in ['official_account_cloud_sms_post_submission','post_submission']"/>
<field name="secret_level"
invisible="send_type in ['official_account_cloud_sms_post_submission','post_submission']"/>
<field name="date"
invisible="send_type in ['official_account_cloud_sms_post_submission','post_submission']"/>
<field name="send_type"/>
</group>
<group>
<field name="department_id"
invisible="send_type in ['official_account_cloud_sms_post_submission','post_submission','official_issues']"/>
<field name="come_file_id" invisible="send_type not in ['official_issues','official_issues_for_son']"/>
<field name="come_file_id"
invisible="send_type not in ['official_issues','official_issues_for_son']"/>
<field name="main_flats"
invisible="send_type in ['official_account_cloud_sms_post_submission','official_issues_for_son']"/>
<field name="servings_number"
@@ -61,25 +70,15 @@
<field name="remarks"
invisible="send_type not in ['official_account_cloud_sms_post_submission','post_submission']"/>
</group>
<div class="o_attachment_preview"/>
<div class="oe_chatter">
<field name="message_follower_ids" groups="base.group_user"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</sheet>
</form>
</field>
</record>
<record id="send_receive_messages_management_search" model="ir.ui.view">
<field name="name">yuthon.official.search</field>
<field name="model">yuthon.official</field>
<field name="arch" type="xml">
<group expand="1" string="Group By">
<filter string="收文发文" name="group_request_receipt_issues"
context="{'group_by': 'category_id'}"/>
</group>
</field>
</record>
<menuitem
id="send_receive_messages_management_menu"
name="公文管理"
web_icon="yuthon_official,static/description/icon.png"
action="send_receive_messages_management_action"/>
</odoo>