@@ -191,7 +191,7 @@
|
||||
</field>
|
||||
</group>
|
||||
</page>
|
||||
<page name="relevancy_type" string="关联流程">
|
||||
<page string="关联流程">
|
||||
<group>
|
||||
<group>
|
||||
<field name="relevancy_type"/>
|
||||
|
||||
@@ -10,6 +10,7 @@ class IssueLibrary(models.Model):
|
||||
_rec_name = 'name'
|
||||
|
||||
name = fields.Char(string='议题事项')
|
||||
issue_approval_decision_id = fields.Many2one('issue.approval.decision', 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([('draft', '草稿'), ('approval', '审批中'), ('done', '已通过'), ('stop', '已拒绝'),
|
||||
@@ -28,6 +29,7 @@ class IssueLibrary(models.Model):
|
||||
notice_documents_ids = fields.Many2many('documents.document', string="议题管理文件")
|
||||
issue_type_id = fields.Many2one('issue.type', string="议题类型")
|
||||
room_booking_id = fields.Many2one('room.booking', string="关联会议")
|
||||
relevancy_type = fields.Selection([('none', '无')], string="关联流程类型")
|
||||
|
||||
def issue_cancel(self):
|
||||
self.write({"statu": "cancel"})
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
decoration-success="statu == 'done'"
|
||||
decoration-muted="statu == 'cancel'">
|
||||
|
||||
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="issue_approval_decision_id"/>
|
||||
<field name="is_party"/>
|
||||
<field name="is_party_pass"/>
|
||||
<field name="is_class_pass"/>
|
||||
@@ -41,6 +41,7 @@
|
||||
<group>
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="issue_approval_decision_id"/>
|
||||
<field name="is_party"/>
|
||||
<field name="is_party_pass"/>
|
||||
<field name="is_party_note" invisible="is_party_pass == True"/>
|
||||
@@ -62,13 +63,17 @@
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="关联流程">
|
||||
<group>
|
||||
<group>
|
||||
<field name="relevancy_type"/>
|
||||
</group>
|
||||
<group/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<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>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
'category': 'Human Resources/Attendances',
|
||||
'version': '0.1',
|
||||
'license': 'LGPL-3',
|
||||
'depends': ['mail', 'hr', 'soong_workflow', 'room'],
|
||||
'depends': ['mail', 'hr', 'soong_workflow', 'room', 'yuthon_issue'],
|
||||
'data': [
|
||||
'data/official_type_data.xml',
|
||||
'security/ir.model.access.csv',
|
||||
@@ -24,6 +24,7 @@
|
||||
'views/yuthon_official_incoming_party_views.xml',
|
||||
'views/inherit_soong_workflow_insector_views.xml',
|
||||
'views/inherit_room_booking_views.xml',
|
||||
'views/inherit_issue_library_views.xml',
|
||||
'views/official_menus.xml',
|
||||
|
||||
|
||||
|
||||
@@ -10,3 +10,4 @@ from . import yuthon_official_incoming_labor
|
||||
from . import yuthon_official_incoming_normal
|
||||
from . import inherit_soong_workflow_insector
|
||||
from . import inherit_room_booking
|
||||
from . import inherit_issue_library
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import api, fields, models, tools
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
|
||||
class IssueLibrary(models.Model):
|
||||
_inherit = "issue.library"
|
||||
_description = '议题库'
|
||||
|
||||
relevancy_type = fields.Selection(selection_add=[('yuthon_official', '行政发文'),
|
||||
('yuthon_official_incoming_normal', '行政收文')],
|
||||
string="关联流程类型")
|
||||
yuthon_official_id = fields.Many2one('yuthon.official', string="行政发文")
|
||||
incoming_normal_id = fields.Many2one('yuthon.official.incoming.normal', string="行政发文")
|
||||
@@ -42,6 +42,20 @@ class YuthonOfficial(models.Model):
|
||||
|
||||
workflow_inspector_ids = fields.One2many('soong.workflow.inspector', 'yuthon_official_id', string="督办事项")
|
||||
room_booking_ids = fields.One2many('room.booking', 'yuthon_official_id', string="会议关联")
|
||||
issue_library_ids = fields.One2many('issue.library', 'yuthon_official_id', string="议题关联")
|
||||
|
||||
def issue_button(self):
|
||||
return {
|
||||
"name": "议题库",
|
||||
"type": "ir.actions.act_window",
|
||||
"view_mode": "form",
|
||||
"res_model": "issue.library",
|
||||
"views": [[self.env.ref('yuthon_issue.view_issue_library_form').id, "form"]],
|
||||
"context": {'default_name': self.name,
|
||||
'default_relevancy_type': 'yuthon_official',
|
||||
'default_yuthon_official_id': self.id,
|
||||
},
|
||||
}
|
||||
|
||||
def supervising_button(self):
|
||||
return {
|
||||
|
||||
@@ -38,6 +38,22 @@ class YuthonOfficialIncomingNormal(models.Model):
|
||||
is_official_incoming = fields.Boolean(string="是否收文")
|
||||
official_documents_ids = fields.Many2many('documents.document', string="收文附件")
|
||||
|
||||
workflow_inspector_ids = fields.One2many('soong.workflow.inspector', 'incoming_normal_id', string="督办事项")
|
||||
room_booking_ids = fields.One2many('room.booking', 'incoming_normal_id', string="会议关联")
|
||||
issue_library_ids = fields.One2many('issue.library', 'incoming_normal_id', string="议题关联")
|
||||
|
||||
def issue_button(self):
|
||||
return {
|
||||
"name": "议题库",
|
||||
"type": "ir.actions.act_window",
|
||||
"view_mode": "form",
|
||||
"res_model": "issue.library",
|
||||
"views": [[self.env.ref('yuthon_issue.view_issue_library_form').id, "form"]],
|
||||
"context": {'default_name': self.name,
|
||||
'default_relevancy_type': 'yuthon_official_incoming_normal',
|
||||
'default_incoming_normal_id': self.id,
|
||||
},
|
||||
}
|
||||
def supervising_button(self):
|
||||
return {
|
||||
"name": "督查督办",
|
||||
@@ -49,7 +65,7 @@ class YuthonOfficialIncomingNormal(models.Model):
|
||||
'default_start_data': fields.Date.today(),
|
||||
'default_end_data': self.done_date,
|
||||
'default_relevancy_type': 'yuthon_official_incoming_normal',
|
||||
'default_yuthon_official_id': self.id,
|
||||
'default_incoming_normal_id': self.id,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -63,6 +79,6 @@ class YuthonOfficialIncomingNormal(models.Model):
|
||||
"context": {
|
||||
'default_name': self.name,
|
||||
'default_relevancy_type': 'yuthon_official_incoming_normal',
|
||||
'default_yuthon_official_id': self.id,
|
||||
'default_incoming_normal_id': self.id,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="issue_library_form_inherit" model="ir.ui.view">
|
||||
<field name="name">issue.library.form.inherit</field>
|
||||
<field name="model">issue.library</field>
|
||||
<field name="inherit_id" ref="yuthon_issue.view_issue_library_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='relevancy_type']" position="after">
|
||||
<field name="yuthon_official_id" invisible="relevancy_type != 'yuthon_official'"/>
|
||||
<field name="incoming_normal_id" invisible="relevancy_type != 'yuthon_official_incoming_normal'"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -18,6 +18,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button name="issue_button" string="上议题" type="object" class="btn-primary"/>
|
||||
<button name="button_meet" string="安排会议" type="object" class="btn-primary"
|
||||
invisible="not is_meet"/>
|
||||
<button name="supervising_button" string="督办" type="object" class="btn-primary"
|
||||
@@ -65,6 +66,9 @@
|
||||
<page string="督办事项" invisible="not is_supervising">
|
||||
<field name="workflow_inspector_ids"/>
|
||||
</page>
|
||||
<page string="议题关联" invisible="not is_supervising">
|
||||
<field name="issue_library_ids"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<form>
|
||||
<header>
|
||||
<button name="button_meet" string="安排会议" type="object" class="btn-primary" invisible="not is_meet"/>
|
||||
<button name="issue_button" string="上议题" type="object" class="btn-primary"/>
|
||||
<button name="done_publish" string="发布" type="object" class="btn-primary"/>
|
||||
<button name="supervising_button" string="督办" type="object" class="btn-primary" invisible="not is_supervising"/>
|
||||
</header>
|
||||
@@ -67,6 +68,9 @@
|
||||
<page string="督办事项" invisible="not is_supervising">
|
||||
<field name="workflow_inspector_ids"/>
|
||||
</page>
|
||||
<page string="议题关联" invisible="not is_supervising">
|
||||
<field name="issue_library_ids"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user