!8150 添加功能

Merge pull request !8150 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2026-01-20 07:38:25 +00:00
committed by Gitee
+15 -3
View File
@@ -75,6 +75,8 @@ class IssueLibrary(models.Model):
is_push_boss = fields.Boolean(string="董事推送")
is_push_depart = fields.Boolean(string="部门推送")
is_state_updated = fields.Boolean(string='状态是否已更新', default=False)
def issue_party_approval(self):
issue_active_ids = self.env["issue.library"].browse(
self._context.get('active_ids', self._context.get('active_id'))
@@ -254,6 +256,9 @@ class IssueLibrary(models.Model):
def library_push(self):
for rec in self:
if rec.is_state_updated:
continue
push_update_vals = {}
if rec.is_party and (rec.is_party_passed == 'reject' or not rec.is_party_passed):
push_update_vals['is_push_party'] = True
@@ -266,9 +271,16 @@ class IssueLibrary(models.Model):
if push_update_vals:
rec.write(push_update_vals)
rec.write({
'issue_state': 'to_approval'
})
if not rec.is_state_updated:
rec.write({
'issue_state': 'to_approval',
'is_state_updated': True
})
else:
rec.write({
'issue_state': 'will'}
)
@api.onchange('is_legal_trial')
def _onchange_is_legal_trial(self):