添加功能

This commit is contained in:
李鹏宇
2025-09-13 18:00:36 +08:00
parent e255e1d7af
commit ae016ac7b3
2 changed files with 2 additions and 3 deletions
@@ -226,8 +226,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
# 按当前申请人自动匹配-本部门(保留部门和公司条件)
department_domain = ['|', ('department_id', '=', record_id.department_id.id),
('department_ids', 'in', record_id.department_id.id)]
company_domain = [('company_id', '=', record_id.company_id.id)] if hasattr(record_id,
'company_id') else []
company_domain = [('company_id', '=', applicant.company_id.id)]
elif is_automatic_company and applicant and hasattr(applicant, 'company_id'):
# 按当前申请人自动匹配-本公司(仅保留公司条件)
@@ -17,7 +17,7 @@ class PropertyManagement(models.Model):
reason_change = fields.Char(string="变更事由")
user_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user)
department_id = fields.Many2one('hr.department', related='user_id.employee_id.department_id',string="申请人部门", store=True)
company_id = fields.Many2one('res.company', related='user_id..employee_id.company_id', string="公司", store=True)
company_id = fields.Many2one('res.company', related='user_id.employee_id.company_id', string="公司", store=True)
handling_opinions = fields.Text(string="经办意见")
management_line2_ids = fields.One2many('property.management.line2', 'property_management_id', string="原物业信息")
management_line_ids = fields.One2many('property.management.line', 'property_management_id', string="物业信息")