diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index 45ab99ef4..d07631186 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -143,7 +143,7 @@ class PropertyBankStatements(models.Model): contract_ids = fields.Many2many('property.lease.contract', string="租赁合同审批") property_name = fields.Text(string="物业名称", compute="compute_property_name", store=True) accounts_id = fields.Many2one('property.accounts.approval', string="关联生成应收审批单") - lessee_id = fields.Many2one(related="contract_id.lessee_id", string='承租方', store=True) + lessee_id = fields.Many2one(related="contract_id.lessee_id", string='承租方', compute="_compute_property_employee_id") admin_id = fields.Many2one('res.users', string="片区管理员", compute="_compute_property_employee_id", store=True, index=True) @api.depends('contract_ids') @@ -151,6 +151,7 @@ class PropertyBankStatements(models.Model): for emp in self: if emp.contract_ids: emp.admin_id = emp.contract_ids[0].admin_id.id + emp.lessee_id = emp.contract_ids[0].lessee_id.id else: emp.admin_id = False diff --git a/yuthon_property_approval/wizard/penalty_line_wizard_viwes.xml b/yuthon_property_approval/wizard/penalty_line_wizard_viwes.xml index 29b627d71..0d9ccd98b 100644 --- a/yuthon_property_approval/wizard/penalty_line_wizard_viwes.xml +++ b/yuthon_property_approval/wizard/penalty_line_wizard_viwes.xml @@ -9,7 +9,7 @@ - +