diff --git a/yuthon_maintain/models/property_device_repair.py b/yuthon_maintain/models/property_device_repair.py index 07f54d96f..b9a3e821b 100644 --- a/yuthon_maintain/models/property_device_repair.py +++ b/yuthon_maintain/models/property_device_repair.py @@ -56,12 +56,7 @@ class PropertyDeviceRelief(models.Model): })) order_id.soong_record_ids = soong_workflow_line_list self.processing_order_id = order_id.id - return { - 'name': '报事报修', - 'view_mode': 'form', - 'res_model': 'processing.order.approval', - 'res_id': order_id.id, - } + class PropertyDeviceLine(models.Model): _name = 'property.device.line' diff --git a/yuthon_maintain/models/property_report_repair.py b/yuthon_maintain/models/property_report_repair.py index 3fc87581a..29a963bce 100644 --- a/yuthon_maintain/models/property_report_repair.py +++ b/yuthon_maintain/models/property_report_repair.py @@ -72,19 +72,13 @@ class PropertyRentRelief(models.Model): }) workflow_record_id = self.env['soong.workflow.record'].search([ ('code', '=', self.code), - ], limit=1) + ]) soong_workflow_line_list.append((0, 0, { 'model': 'processing.order.approval', 'res_id': order_id.id, 'workflow_record_id': workflow_record_id.id })) self.processing_order_id = order_id.id - return { - 'name': '报事报修', - 'view_mode': 'form', - 'res_model': 'processing.order.approval', - 'res_id': order_id.id, - } class PropertyDeviceLine(models.Model): diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py index 24863ce92..dd74dce87 100644 --- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py +++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py @@ -347,7 +347,7 @@ class PropertyReconciliationWizard(models.Model): """ remaining_amount = self.bank_id.no_amount penalty_lines = [line for line in self.reconciliation_line_ids if line.collection_type == "penalty"] # 违约金行 - rent_lines = [line for line in self.reconciliation_line_ids if line.collection_type == "rent"] # 租金行 + rent_lines = [line for line in self.reconciliation_line_ids if line.contract_id.contract_code == "(租)(管)TX2023-072"] # 租金行 type_priority = { 'deposit': 1, # 押金优先 @@ -373,7 +373,7 @@ class PropertyReconciliationWizard(models.Model): assign_amount = min(need_amount, remaining_amount) line.amount = assign_amount remaining_amount -= assign_amount - if assign_amount > 0: + if assign_amount > 0 and round(line.amount or 0, 2)>0: line.onchange_remake() if remaining_amount > 0: