diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py
index a6833d723..072c3dbbc 100644
--- a/yuthon_property_approval/models/inherit_yuthon_property.py
+++ b/yuthon_property_approval/models/inherit_yuthon_property.py
@@ -203,6 +203,13 @@ class PropertyBankStatements(models.Model):
for rec in bank_ids:
rec.start_time = rec.start_time - timedelta(hours=8)
+ def contract_context(self):
+ bank_ids = self.env["property.bank.statements"].browse(self._context.get('active_ids', self._context.get('active_id')))
+ for property in bank_ids:
+ for pro in property.property_ids:
+ property.write({'contract_ids': [(4, pro.property_contract_ids.lease_contract_id.id)]})
+ property.write({'lessee_ids': [(4, pro.property_contract_ids.lessee_id.id)]})
+
def revocation(self):
self.ensure_one()
current_rec = self[0]
diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
index 0207f32e2..8a25904ab 100644
--- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml
+++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
@@ -679,6 +679,13 @@
code
action = model.test_one()
+
+ 关联绑定承租方和合同
+
+
+ code
+ action = model.contract_context()
+
property.penalty.list.tree
diff --git a/yuthon_property_approval/wizard/property_physical_wizard.py b/yuthon_property_approval/wizard/property_physical_wizard.py
index 63b13eb06..009ad8c26 100644
--- a/yuthon_property_approval/wizard/property_physical_wizard.py
+++ b/yuthon_property_approval/wizard/property_physical_wizard.py
@@ -33,7 +33,7 @@ class PropertyPhysicalWizard(models.Model):
fees = row[6].value
employee_id = self.env['hr.employee'].search([('name', '=', row[2].value)])
physical_date = {
- 'reimbursement_id':self.reimbursement_id.id,
+ 'reimbursement_id': self.reimbursement_id.id,
'package_grouping': package_grouping,
'package_fee': package_fee,
'examination_fee': examination_fee,