添加功能

This commit is contained in:
李鹏宇
2026-01-24 11:17:21 +08:00
parent 446481815e
commit 6cb9e4bab2
2 changed files with 9 additions and 9 deletions
@@ -117,9 +117,9 @@ class SoongWorkflowCommentWizard(models.TransientModel):
for ret in self.return_link_id:
if ret.name in ['拟办', '申请人']:
if hasattr(record_id, 'user_id') and record_id.user_id:
employee_ids1 = record_id.user_id.employee_ids
employee_ids1 = self.env['hr.employee'].search([('user_id', '=', record_id.user_id.id)])
elif hasattr(record_id, 'users_id') and record_id.users_id:
employee_ids1 = record_id.users_id.employee_ids
employee_ids1 = self.env['hr.employee'].search([('user_id', '=', record_id.users_id.id)])
self.employee_ids1 = employee_ids1
elif self.node_btn_name == '退回':
next_list = []
@@ -35,7 +35,7 @@
<group>
<!-- 归档弹窗新增“本公司”勾选,控制抄送人员是否限定当前公司 -->
<field name="is_this_company"/>
<field name="circulated_employee_ids" widget="many2many_tags" options="{'no_create': True}" domain="[('company_id', '=', company_id), ('id', 'not in' , filter_personnel_ids)] if is_this_company else [('id', 'not in' , filter_personnel_ids)]"/>
<field name="circulated_employee_ids" widget="many2many_tags" options="{'no_create': True}" domain="[('company_id', '=', company_id), ('id', 'not in' , filter_personnel_ids)] if is_this_company else [('id', 'not in' , filter_personnel_ids)]" context="{'select_dialog': 'list'}"/>
<field name="document_ids" string="附件" widget="preview_many2many" force_save="1"/>
</group>
</group>
@@ -59,7 +59,7 @@
<field name="comment_note" placeholder="请输入意见内容..." style="width: 100%;"/>
</div>
<group>
<field name="circulated_employee_ids" widget="many2many_tags" options="{'no_create': True}" domain = "[('company_id', '=', company_id), ('id', 'not in' , filter_personnel_ids)]"/>
<field name="circulated_employee_ids" widget="many2many_tags" options="{'no_create': True}" domain = "[('company_id', '=', company_id), ('id', 'not in' , filter_personnel_ids)]" context="{'select_dialog': 'list'}"/>
</group>
</group>
<group invisible="node_btn_name != '分发'">
@@ -94,8 +94,8 @@
<field name="is_selection"/>
<field name="company_id" invisible="1"/>
<field name="employee_ids1" widget="many2many_tags" string="人员范围" invisible="1"/>
<field name="employee_ids" widget="many2many_tags" string="人员范围" domain = "[('company_id', '=', company_id), ('id', 'in', employee_ids1)] if is_this_company else [('id', 'in', employee_ids1)]" options="{'no_create': True}" context="{'tree_view_ref':'yuthon_hr_employee.view_employee_phone_tree'}"/>
<field name="circulated_employee_ids" invisible="node_btn_name == '退回'" widget="many2many_tags" options="{'no_create': True}" domain = "[('company_id', '=', company_id),('id', 'not in' , filter_personnel_ids)]"/>
<field name="employee_ids" widget="many2many_tags" string="人员范围" domain = "[('company_id', '=', company_id), ('id', 'in', employee_ids1)] if is_this_company else [('id', 'in', employee_ids1)]" options="{'no_create': True}" context="{'select_dialog': 'list'}"/>
<field name="circulated_employee_ids" invisible="node_btn_name == '退回'" widget="many2many_tags" options="{'no_create': True}" domain = "[('company_id', '=', company_id),('id', 'not in' , filter_personnel_ids)]" context="{'select_dialog': 'list'}"/>
<!-- <field name="add_employee_ids" invisible="node_btn_name == '退回'" widget="many2many_tags" options="{'no_create': True}"/>-->
</group>
</group>
@@ -109,9 +109,9 @@
<field name="employee_ids" widget="many2many_tags" string="董事长" domain="[('user_role_id.name', '=', '董事长')]" options="{'no_create': True}" groups="yuthon_salary.group_jtbb_user"/>
<!-- 分发弹窗:本公司开关控制人员筛选范围 -->
<field name="is_this_company"/>
<field name="dep_manager_employee_ids" widget="many2many_tags" string="承办" options="{'no_create': True}" domain="[('company_id', '=', company_id)] if is_this_company else []"/>
<field name="circulated_employee_ids" widget="many2many_tags" options="{'no_create': True}" domain="[('company_id', '=', company_id), ('id', 'not in' , filter_personnel_ids)] if is_this_company else [('id', 'not in' , filter_personnel_ids)]"/>
<field name="supervising_employee_ids" widget="many2many_tags" invisible="not is_supervising" options="{'no_create': True}"/>
<field name="dep_manager_employee_ids" widget="many2many_tags" string="承办" options="{'no_create': True}" domain="[('company_id', '=', company_id)] if is_this_company else []" context="{'select_dialog': 'list'}"/>
<field name="circulated_employee_ids" widget="many2many_tags" options="{'no_create': True}" domain="[('company_id', '=', company_id), ('id', 'not in' , filter_personnel_ids)] if is_this_company else [('id', 'not in' , filter_personnel_ids)]" context="{'select_dialog': 'list'}"/>
<field name="supervising_employee_ids" widget="many2many_tags" invisible="not is_supervising" options="{'no_create': True}" context="{'select_dialog': 'list'}"/>
</group>
<footer>
<button name="add_comment" string="确认" type="object" class="oe_highlight"/>