@@ -203,7 +203,18 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
continue
|
||||
record_id = self.env[record.res_model].browse(record.res_id) if record.res_model and record.res_id else None
|
||||
for link in record.trans_link_id:
|
||||
employee_user_role_ids = self._get_approvers_for_link(link, record_id)
|
||||
if link.name == '印章管理员':
|
||||
stamp_types = record_id.type_stamp_ids
|
||||
if stamp_types:
|
||||
user_ids = self.env['res.users']
|
||||
for stamp in stamp_types:
|
||||
user_ids |= stamp.user_ids
|
||||
if user_ids:
|
||||
employee_user_role_ids = self.env['hr.employee'].sudo().search([
|
||||
('user_id', 'in', user_ids.ids)
|
||||
])
|
||||
else:
|
||||
employee_user_role_ids = self._get_approvers_for_link(link, record_id)
|
||||
workflow_id = link.node_button_id.workflow_id
|
||||
node = workflow_id.node_ids.search([
|
||||
('name', '=', link.name),
|
||||
|
||||
@@ -29,7 +29,7 @@ class SealsTypeSetting(models.Model):
|
||||
name = fields.Char(string='名称')
|
||||
scope_setting_id = fields.Many2one('seals.scope.setting', string="用章范围")
|
||||
department_id = fields.Many2one('hr.department', string="部门")
|
||||
user_id = fields.Many2one('res.users', string="保管人")
|
||||
user_ids = fields.Many2many('res.users', string="保管人")
|
||||
start_date = fields.Date(string="生效日期", copy=False, default=fields.Date.today())
|
||||
end_date = fields.Date(string="失效日期")
|
||||
is_effect = fields.Boolean(string="是否生效", compute="_compute_is_effect")
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<tree string="用章类型" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="scope_setting_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="user_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
<field name="department_id"/>
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
|
||||
Reference in New Issue
Block a user