收发文
This commit is contained in:
@@ -32,6 +32,7 @@ export class FieldTinyMCE extends Component {
|
||||
plugins: 'autoresize preview importcss searchreplace autolink directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap quickbars emoticons accordion',
|
||||
editimage_cors_hosts: ['picsum.photos'],
|
||||
image_advtab: true,
|
||||
language:"zh_CN",
|
||||
importcss_append: true,
|
||||
height: 'auto',
|
||||
image_caption: true,
|
||||
|
||||
@@ -10,11 +10,9 @@
|
||||
'category': 'Human Resources/Attendances',
|
||||
'version': '0.1',
|
||||
'license': 'LGPL-3',
|
||||
'depends': ['approvals', 'yuthon_approval', 'mail'],
|
||||
'depends': ['mail', 'documents'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'security/issue_security.xml',
|
||||
'data/approval_category_type_data.xml',
|
||||
'data/issue_library_code_data.xml',
|
||||
'views/issue_library_views.xml',
|
||||
],
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="approval_category_data_notice_approval" model="approval.category">
|
||||
<field name="name">议题管理</field>
|
||||
<field name="approval_type">issue_library</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -9,27 +9,19 @@ class IssueLibrary(models.Model):
|
||||
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_rec_name = 'name'
|
||||
|
||||
name = fields.Char(string='议题名称')
|
||||
code = fields.Char(string='编号', required=True, copy=False,
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('issue_library_code'))
|
||||
type_issue = fields.Selection([('business_report', '业务汇报'), ('project_progress', '项目进展'),
|
||||
('hr', '人力资源'), ('account_report', '财务报告')], string="议题类别")
|
||||
objective = fields.Char(string='目的')
|
||||
employee_ids = fields.Many2many('hr.employee', string='参与人员')
|
||||
meeting_et = fields.Datetime(string='会议预计时间')
|
||||
issue_creation_time = fields.Datetime(string='议题创建时间', default=lambda self: fields.Datetime.now())
|
||||
degree_importance = fields.Selection([('normal', '正常'), ('important', '紧急'), ('very_important', '加急')],
|
||||
string="重要程度", default='normal')
|
||||
issue_status = fields.Selection([('will_meeting', '待上会'), ('done_meeting', '已上会'),
|
||||
('reject', '驳回'), ('cancel', '取消')], string="状态", default="will_meeting")
|
||||
issue_approval_type = fields.Selection([('ready_meeting', '党总支'), ('party_branch_committee', '党支委'),
|
||||
('management_team', '经营班子'), ('board_directors', '董事会')],
|
||||
string="议题审批类型")
|
||||
company_id = fields.Many2one('res.company', string='公司', index=True, default=lambda self: self.env.company)
|
||||
|
||||
def go_meeting_approval(self):
|
||||
# 将议题生成审批并且跳转。
|
||||
self.write({"issue_status": "done_meeting"})
|
||||
name = fields.Char(string='议题事项')
|
||||
issue_id = fields.Many2one('issue.library', string="上级议题", ondelete='cascade')
|
||||
issue_ids = fields.One2many('issue.library', 'issue_id', string='子议题')
|
||||
code = fields.Char(string='编号', required=True, copy=False, default=lambda self: self.env['ir.sequence'].next_by_code('issue_library_code'))
|
||||
statu = fields.Selection([('will', '待上会'), ('done', '已上会'), ('cancel', '已取消')], default='will', string="议题状态")
|
||||
is_party = fields.Boolean(string="党之委会")
|
||||
is_class = fields.Boolean(string="班子会")
|
||||
is_boss = fields.Boolean(string="董事会")
|
||||
is_note = fields.Boolean(string="备案、核准")
|
||||
creart_datetime = fields.Datetime(string="创建时间", default=fields.Datetime.now)
|
||||
|
||||
def issue_cancel(self):
|
||||
self.write({"issue_status": "cancel"})
|
||||
self.write({"statu": "cancel"})
|
||||
|
||||
def on_meeting(self):
|
||||
self.write({"statu": "done"})
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import api, fields, models, tools
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
|
||||
|
||||
class ApprovalCategory(models.Model):
|
||||
_inherit = 'approval.category'
|
||||
_description = '议题管理'
|
||||
|
||||
approval_type = fields.Selection(selection_add=[('issue_library', '议题管理')])
|
||||
|
||||
|
||||
class ApprovalRequest(models.Model):
|
||||
_inherit = "approval.request"
|
||||
_description = '议题管理'
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="tianhe_issue_library" model="ir.rule">
|
||||
<field name="name">议题多公司权限</field>
|
||||
<field name="model_id" ref="model_issue_library"/>
|
||||
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -5,19 +5,18 @@
|
||||
<field name="model">issue.library</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="议题库"
|
||||
decoration-info="issue_status == 'will_meeting'"
|
||||
decoration-success="issue_status == 'done_meeting'"
|
||||
decoration-muted="issue_status == 'cancel'">
|
||||
decoration-info="statu == 'will'"
|
||||
decoration-success="statu == 'done'"
|
||||
decoration-muted="statu == 'cancel'">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="type_issue"/>
|
||||
<field name="objective"/>
|
||||
<field name="meeting_et"/>
|
||||
<field name="issue_creation_time"/>
|
||||
<field name="degree_importance"/>
|
||||
<field name="issue_approval_type"/>
|
||||
<field name="company_id"/>
|
||||
<field name="issue_status"/>
|
||||
<field name="issue_id"/>
|
||||
<field name="is_party"/>
|
||||
<field name="is_class"/>
|
||||
<field name="is_boss"/>
|
||||
<field name="is_note"/>
|
||||
<field name="creart_datetime"/>
|
||||
<field name="statu"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -28,10 +27,9 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="议题库">
|
||||
<header>
|
||||
<widget name="attach_document" string="附加文档" action="message_post"/>
|
||||
<button name="go_meeting_approval" string="上会申请" type="object" class="oe_highlight"/>
|
||||
<button name="issue_cancel" string="取消" type="object" class="oe_highlight"/>
|
||||
<field name="issue_status" widget="statusbar"/>
|
||||
<button name="on_meeting" string="上会" type="object" class="oe_highlight"/>
|
||||
<field name="statu" widget="statusbar"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
@@ -43,16 +41,15 @@
|
||||
<group>
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="type_issue"/>
|
||||
<field name="objective"/>
|
||||
<field name="employee_ids" widget="many2many_tags"/>
|
||||
<field name="meeting_et"/>
|
||||
<field name="issue_id"/>
|
||||
<field name="issue_ids" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="issue_creation_time"/>
|
||||
<field name="degree_importance"/>
|
||||
<field name="issue_approval_type"/>
|
||||
<field name="company_id"/>
|
||||
<field name="is_party"/>
|
||||
<field name="is_class"/>
|
||||
<field name="is_boss"/>
|
||||
<field name="is_note"/>
|
||||
<field name="creart_datetime"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
@@ -71,11 +68,14 @@
|
||||
<field name="model">issue.library</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="议题">
|
||||
<filter string="待上会" name="issue_status" domain="[('issue_status', '=', 'will_meeting')]"/>
|
||||
<filter string="已上会" name="issue_status" domain="[('issue_status', '=', 'done_meeting')]"/>
|
||||
<filter string="待上会" name="statu" domain="[('statu', '=', 'will')]"/>
|
||||
<filter string="已上会" name="statu" domain="[('statu', '=', 'done')]"/>
|
||||
<group expand="0">
|
||||
<filter name="group_manager" string="会议状态" domain="[]" context="{'group_by': 'issue_status'}"/>
|
||||
<filter name="group_manager" string="会议状态" domain="[]" context="{'group_by': 'statu'}"/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field name="issue_id" string="议题" enable_counters="1"/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="notice_text" widget="html"/>
|
||||
<field name="notice_text" widget="tinymce"/>
|
||||
<field name="sequence" invisible="1"/>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -32,3 +32,4 @@ class YuthonOfficialIncomingParty(models.Model):
|
||||
string="状态", default='drft')
|
||||
deadline = fields.Date(string="办理期限")
|
||||
red_suit = fields.Char(string="套红")
|
||||
official_documents_ids = fields.Many2many('documents.document', string="公文相关文件")
|
||||
|
||||
@@ -34,6 +34,7 @@ class YuthonOfficial(models.Model):
|
||||
statu = fields.Selection([('drft', '草稿'), ('going', '审批中'), ('cancel', '已取消'), ('no', '未发布'), ('done', '已发布')], string="状态", default='drft')
|
||||
deadline = fields.Date(string="办理期限")
|
||||
red_suit = fields.Char(string="套红")
|
||||
official_documents_ids = fields.Many2many('documents.document', string="公文相关文件")
|
||||
|
||||
def cancel_official(self):
|
||||
self.write({'statu': '已取消'})
|
||||
@@ -51,3 +52,6 @@ class YuthonOfficial(models.Model):
|
||||
partner_ids = self.sudo().env['res.users'].search([('id', 'in', publish_user_list)]).mapped('partner_id').ids
|
||||
self.sudo().with_context(lang=self.env.lang)._message_auto_subscribe_notify(partner_ids, 'yuthon_official.message_yuthon_official_confirm_users_data')
|
||||
self.write({"statu": 'done'})
|
||||
|
||||
def supervising_official(self):
|
||||
pass
|
||||
|
||||
@@ -32,3 +32,4 @@ class YuthonOfficialIncomingLabor(models.Model):
|
||||
string="状态", default='drft')
|
||||
deadline = fields.Date(string="办理期限")
|
||||
red_suit = fields.Char(string="套红")
|
||||
official_documents_ids = fields.Many2many('documents.document', string="公文相关文件")
|
||||
|
||||
@@ -31,3 +31,4 @@ class YuthonOfficialIncomingNormal(models.Model):
|
||||
string="状态", default='drft')
|
||||
deadline = fields.Date(string="办理期限")
|
||||
red_suit = fields.Char(string="套红")
|
||||
official_documents_ids = fields.Many2many('documents.document', string="公文相关文件")
|
||||
|
||||
@@ -32,3 +32,4 @@ class YuthonOfficialLabor(models.Model):
|
||||
string="状态", default='drft')
|
||||
deadline = fields.Date(string="办理期限")
|
||||
red_suit = fields.Char(string="套红")
|
||||
official_documents_ids = fields.Many2many('documents.document', string="公文相关文件")
|
||||
|
||||
@@ -32,3 +32,4 @@ class YuthonOfficialParty(models.Model):
|
||||
string="状态", default='drft')
|
||||
deadline = fields.Date(string="办理期限")
|
||||
red_suit = fields.Char(string="套红")
|
||||
official_documents_ids = fields.Many2many('documents.document', string="公文相关文件")
|
||||
|
||||
@@ -12,6 +12,38 @@
|
||||
name="我的公文"
|
||||
sequence="2"/>
|
||||
|
||||
<menuitem
|
||||
id="yuthon_official_normal_management_menu"
|
||||
parent="official_management_menu_root"
|
||||
name="行政公文管理"
|
||||
sequence="5"/>
|
||||
|
||||
<menuitem
|
||||
id="yuthon_official_party_management_menu"
|
||||
parent="official_management_menu_root"
|
||||
name="党总支公文管理"
|
||||
sequence="7"/>
|
||||
|
||||
<menuitem
|
||||
id="yuthon_official_labor_management_menu"
|
||||
parent="official_management_menu_root"
|
||||
name="工会公文管理"
|
||||
sequence="9"/>
|
||||
|
||||
<menuitem
|
||||
id="official_management_partner_menu"
|
||||
parent="official_management_menu_root"
|
||||
name="发文单位管理"
|
||||
action="official_partner_action"
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem
|
||||
id="official_management_type_menu"
|
||||
parent="official_management_menu_root"
|
||||
name="公文类型管理"
|
||||
action="official_type_action"
|
||||
sequence="15"/>
|
||||
|
||||
<menuitem
|
||||
id="yuthon_official_my_admin"
|
||||
parent="yuthon_official_my_menu"
|
||||
@@ -33,12 +65,6 @@
|
||||
action="yuthon_official_party_action2"
|
||||
sequence="7"/>
|
||||
|
||||
<menuitem
|
||||
id="yuthon_official_normal_management_menu"
|
||||
parent="official_management_menu_root"
|
||||
name="行政公文管理"
|
||||
sequence="5"/>
|
||||
|
||||
<menuitem
|
||||
id="yuthon_official_normal"
|
||||
parent="yuthon_official_normal_management_menu"
|
||||
@@ -53,12 +79,6 @@
|
||||
action="yuthon_official_incoming_normal_action"
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem
|
||||
id="yuthon_official_party_management_menu"
|
||||
parent="official_management_menu_root"
|
||||
name="党总支公文管理"
|
||||
sequence="7"/>
|
||||
|
||||
<menuitem
|
||||
id="yuthon_official_incoming_party"
|
||||
parent="yuthon_official_party_management_menu"
|
||||
@@ -73,12 +93,6 @@
|
||||
action="yuthon_official_party_action"
|
||||
sequence="20"/>
|
||||
|
||||
<menuitem
|
||||
id="yuthon_official_labor_management_menu"
|
||||
parent="official_management_menu_root"
|
||||
name="工会公文管理"
|
||||
sequence="9"/>
|
||||
|
||||
<menuitem
|
||||
id="yuthon_official_incoming_labor"
|
||||
parent="yuthon_official_labor_management_menu"
|
||||
@@ -93,17 +107,4 @@
|
||||
action="yuthon_official_labor_action"
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem
|
||||
id="official_management_partner_menu"
|
||||
parent="official_management_menu_root"
|
||||
name="发文单位管理"
|
||||
action="official_partner_action"
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem
|
||||
id="official_management_type_menu"
|
||||
parent="official_management_menu_root"
|
||||
name="公文类型管理"
|
||||
action="official_type_action"
|
||||
sequence="15"/>
|
||||
</odoo>
|
||||
@@ -43,6 +43,11 @@
|
||||
<field name="copy_flats"/>
|
||||
<field name="servings_number"/>
|
||||
<field name="deadline"/>
|
||||
<field name="official_documents_ids">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -43,6 +43,11 @@
|
||||
<field name="copy_flats"/>
|
||||
<field name="servings_number"/>
|
||||
<field name="deadline"/>
|
||||
<field name="official_documents_ids">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -43,6 +43,11 @@
|
||||
<field name="copy_flats"/>
|
||||
<field name="servings_number"/>
|
||||
<field name="deadline"/>
|
||||
<field name="official_documents_ids">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -35,6 +35,11 @@
|
||||
<field name="major_event_category"/>
|
||||
<field name="date"/>
|
||||
<field name="deadline"/>
|
||||
<field name="official_documents_ids">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group>
|
||||
<field name="department_id"/>
|
||||
@@ -109,6 +114,11 @@
|
||||
<field name="major_event_category"/>
|
||||
<field name="date"/>
|
||||
<field name="deadline"/>
|
||||
<field name="official_documents_ids">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group>
|
||||
<field name="department_id"/>
|
||||
|
||||
@@ -43,6 +43,11 @@
|
||||
<field name="copy_flats"/>
|
||||
<field name="servings_number"/>
|
||||
<field name="deadline"/>
|
||||
<field name="official_documents_ids">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
@@ -120,6 +125,11 @@
|
||||
<field name="copy_flats"/>
|
||||
<field name="servings_number"/>
|
||||
<field name="deadline"/>
|
||||
<field name="official_documents_ids">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
class="btn-primary"/>
|
||||
<button name="done_publish" string="发布" invisible="statu != 'no'" type="object"
|
||||
class="btn-primary"/>
|
||||
<button name="supervising_official" string="督办" invisible="statu != 'no'" type="object"
|
||||
class="btn-primary"/>
|
||||
<field name="statu" widget="statusbar"/>
|
||||
</header>
|
||||
<sheet>
|
||||
@@ -44,6 +46,11 @@
|
||||
<field name="secret_level"/>
|
||||
<field name="date"/>
|
||||
<field name="deadline"/>
|
||||
<field name="official_documents_ids">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group>
|
||||
<field name="department_id"/>
|
||||
@@ -127,6 +134,11 @@
|
||||
<field name="secret_level"/>
|
||||
<field name="date"/>
|
||||
<field name="deadline"/>
|
||||
<field name="official_documents_ids">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group>
|
||||
<field name="department_id"/>
|
||||
|
||||
Reference in New Issue
Block a user