diff --git a/yuthon_issue/models/__init__.py b/yuthon_issue/models/__init__.py
index 313fe4791..6169dfcf9 100644
--- a/yuthon_issue/models/__init__.py
+++ b/yuthon_issue/models/__init__.py
@@ -8,4 +8,4 @@ from . import inherit_room_booking
from . import issue_approval
from . import inherit_hr_employee
from . import issue_meeting_minutes
-from . import inherit_soong_workflow_mixin
+
diff --git a/yuthon_issue/models/inherit_soong_workflow_mixin.py b/yuthon_issue/models/inherit_soong_workflow_mixin.py
deleted file mode 100644
index 791bdca43..000000000
--- a/yuthon_issue/models/inherit_soong_workflow_mixin.py
+++ /dev/null
@@ -1,22 +0,0 @@
-from odoo import api, fields, models, _
-from odoo.exceptions import UserError
-
-
-class SoongWorkflowMixin(models.AbstractModel):
- _inherit = 'soong.workflow.mixin'
-
- # 上议题
- def action_meeting(self):
- if self.is_issues:
- raise UserError('当前议题已上会,请勿重复提交')
- self.write({'is_issues': 'Ture'})
- issue_id = self.env['issue.library'].create({'name': self.name})
- self.related_issues_id = issue_id.id
- workflow_record_id = self.env["soong.workflow.record"].search([("res_model", "=", self._name), ("res_id", "=", self.id)])
- self.env['issue.library.approval.line'].create({
- 'issue_library_id': issue_id.id,
- 'workflow_record_id': workflow_record_id.id,
- 'approval_type': workflow_record_id.workflow_id.id,
- 'code': self.code,
- 'approval_date': fields.Datetime.now(),
- })
diff --git a/yuthon_issue/models/issue_approval_decision.py b/yuthon_issue/models/issue_approval_decision.py
index 86528c949..1681c227b 100644
--- a/yuthon_issue/models/issue_approval_decision.py
+++ b/yuthon_issue/models/issue_approval_decision.py
@@ -13,7 +13,7 @@ class IssueApprovalDecision(models.Model):
specifics = fields.Text(string='具体事项')
council = fields.Selection([('approval', '审'), ('decide', '决')], string='党总委员会')
team_meet = fields.Selection([('approval', '审'), ('decide', '决')], string='经营班子会')
- board_meet = fields.Selection([('approval', '审'), ('decide', '决'), ('commission', '授权投决会')], string='董事会')
+ board_meet = fields.Selection([('approval', '审'), ('decide', '决'), ('commission', '授权投决会')], string='董事会', compute='_compute_board_meet')
district_bureau = fields.Selection([('record', '备案'), ('approved', '核准'), ('record_approved', '备案、核准')], string='上级单位')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
@@ -36,5 +36,9 @@ class IssueApprovalDecision(models.Model):
if seq.decision_type_id.decision_type_id:
seq.decision_type_on_id = seq.decision_type_id.decision_type_id
-
+ @api.depends('board_meet')
+ def _compute_board_meet(self):
+ for record in self:
+ if record.board_meet:
+ record.team_meet = 'approval'
diff --git a/yuthon_issue/models/issue_library.py b/yuthon_issue/models/issue_library.py
index 545d70b75..226678bd2 100644
--- a/yuthon_issue/models/issue_library.py
+++ b/yuthon_issue/models/issue_library.py
@@ -10,7 +10,7 @@ class IssueLibrary(models.Model):
_rec_name = 'name'
name = fields.Char(string='议题事项')
- name_text = fields.Text(string='议题事项')
+ name_text = fields.Text(string='议题事项', compute='_compute_name', readonly=False)
code = fields.Char(string='编号', required=True, copy=False,
default=lambda self: self.env['ir.sequence'].next_by_code('issue_library_code'))
state = fields.Selection([('draft', '待提交'), ('approval', '审批中'), ('on_approval', '已审批'),
@@ -155,9 +155,10 @@ class IssueLibrary(models.Model):
raise UserError('议题已上会,不能删除')
return super().unlink()
- @api.onchange('name')
- def _onchange_name(self):
- self.name_text = self.name
+ @api.depends('name')
+ def _compute_name(self):
+ for record in self:
+ record.name_text = record.name
@api.onchange('issue_library_room_line_ids')
def _onchange_issue_library_room_line_ids(self):
diff --git a/yuthon_issue/views/issue_library_views.xml b/yuthon_issue/views/issue_library_views.xml
index 489ccb75b..1b084a33f 100644
--- a/yuthon_issue/views/issue_library_views.xml
+++ b/yuthon_issue/views/issue_library_views.xml
@@ -52,7 +52,6 @@
-
@@ -103,7 +102,7 @@
-
+
@@ -171,7 +170,6 @@
-
@@ -222,7 +220,7 @@
-
+
@@ -344,7 +342,6 @@
-
@@ -387,7 +384,7 @@
-
+
@@ -452,7 +449,6 @@
-
@@ -503,7 +499,7 @@
-
+
@@ -560,8 +556,6 @@
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_tree3')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_issue.view_issue_library_form3')})]"/>
-
-
issue.library.tree
@@ -607,7 +601,6 @@
-
@@ -650,7 +643,7 @@
-
+
@@ -715,7 +708,6 @@
-
@@ -766,7 +758,7 @@
-
+
@@ -868,7 +860,6 @@
-
@@ -911,7 +902,7 @@
-
+
@@ -987,7 +978,6 @@
-
@@ -1038,7 +1028,7 @@
-
+
@@ -1128,7 +1118,6 @@
-
@@ -1155,8 +1144,8 @@
-
+
@@ -1171,7 +1160,7 @@
-
+
@@ -1236,7 +1225,6 @@
-
@@ -1287,7 +1275,7 @@
-
+
@@ -1388,7 +1376,6 @@
-
@@ -1431,7 +1418,7 @@
-
+
@@ -1496,7 +1483,6 @@
-
@@ -1547,7 +1533,7 @@
-
+
@@ -1648,7 +1634,6 @@
-
@@ -1691,7 +1676,7 @@
-
+
@@ -1767,7 +1752,6 @@
-
@@ -1818,7 +1802,7 @@
-
+
@@ -1908,7 +1892,6 @@
-
@@ -1951,7 +1934,7 @@
-
+
@@ -2027,7 +2010,6 @@
-
@@ -2078,7 +2060,7 @@
-
+
@@ -2175,7 +2157,6 @@
-
@@ -2222,7 +2203,7 @@
-
+
@@ -2287,7 +2268,6 @@
-
@@ -2338,7 +2318,7 @@
-
+
@@ -2454,7 +2434,6 @@
-
@@ -2502,7 +2481,7 @@
-
+
@@ -2567,7 +2546,6 @@
-
@@ -2618,7 +2596,7 @@
-
+