From 0e3b8f4dd1d14c32b9db5a941513007e261e5841 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Sat, 4 Jan 2025 18:02:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- soong_workflow/models/soong_workflow_mixin.py | 2 +- yuthon_notice/views/yuthon_notice_views.xml | 2 +- yuthon_property/views/menuitem.xml | 4 +- .../views/property_meter_reading_views.xml | 1 - .../views/yuthon_property_views.xml | 8 +- .../models/property_lease_contract.py | 13 +- .../views/property_lease_contract.xml | 321 +++++++++++++++++- .../views/property_menu_all.xml | 51 ++- 8 files changed, 362 insertions(+), 40 deletions(-) diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py index 9968db23b..491c5ebc0 100644 --- a/soong_workflow/models/soong_workflow_mixin.py +++ b/soong_workflow/models/soong_workflow_mixin.py @@ -306,7 +306,7 @@ class SoongWorkflowMixin(models.AbstractModel): record_obj = self.env["soong.workflow.record"].search([("res_model", "=", rec._name), ("res_id", "=", rec.id)]) current_user_id = self.env.user.id state = '拟办' if self.state == 'start' else self.state - button_ids = self.workflow_id.node_ids.search([('name', '=', state), ('workflow_id', '=', self.workflow_id.id)]).button_ids + button_ids = self.workflow_id.node_ids.search([('node_name', '=', state), ('workflow_id', '=', self.workflow_id.id)]).button_ids user_ids_list = [] if state != 'end': if button_ids: diff --git a/yuthon_notice/views/yuthon_notice_views.xml b/yuthon_notice/views/yuthon_notice_views.xml index 5df941249..e6ae1dc20 100644 --- a/yuthon_notice/views/yuthon_notice_views.xml +++ b/yuthon_notice/views/yuthon_notice_views.xml @@ -58,7 +58,7 @@ - /> + diff --git a/yuthon_property/views/menuitem.xml b/yuthon_property/views/menuitem.xml index 54a5e7e07..6b97c90e2 100644 --- a/yuthon_property/views/menuitem.xml +++ b/yuthon_property/views/menuitem.xml @@ -77,10 +77,10 @@ sequence="3"/> diff --git a/yuthon_property/views/property_meter_reading_views.xml b/yuthon_property/views/property_meter_reading_views.xml index 4046e6d63..aec7eab51 100644 --- a/yuthon_property/views/property_meter_reading_views.xml +++ b/yuthon_property/views/property_meter_reading_views.xml @@ -88,7 +88,6 @@ 水表抄表 property.meter.reading tree,form,search - {'search_default_property_id': 1, 'search_default_reading_type': 1} [('meter_type','=','water')] diff --git a/yuthon_property/views/yuthon_property_views.xml b/yuthon_property/views/yuthon_property_views.xml index 8d066a0fd..bf4d0e1d3 100644 --- a/yuthon_property/views/yuthon_property_views.xml +++ b/yuthon_property/views/yuthon_property_views.xml @@ -86,16 +86,16 @@ + + + + - - - - diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 60055f928..748905286 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -94,7 +94,8 @@ class PropertyLeaseContract(models.Model): is_mange = fields.Boolean(string="是否有管理费") miscellaneous = fields.Text(string="其他约定") total_area = fields.Float(string="总面积", digits=(16, 4)) - state = fields.Selection([('new', '新建'),('approval','审批'),('cancel','作废')], string="状态", default='new') + condition = fields.Selection([('new', '新建'),('approval','审批'),('cancel','作废')], string="状态", default='new') + message_type = fields.Selection([('be_executed','待执行'), ('executed','已执行'), ('expired','已终止'), ('advance','提前终止')], string="合同状态") contract_type = fields.Selection([('lease_renewal', '续租'), ('interim', '临租'), ('new', '补充协议'), ('first', '首租')], string="合同类型", default='first') lease_ids = fields.One2many('property.lease.contract.line', 'lease_id',string="物业信息明细行") breakdown_ids = fields.One2many('property.rent.breakdown.line', 'breakdown_id', string="物业租金明细行") @@ -522,6 +523,14 @@ class PropertyLeaseContract(models.Model): for record in contract_ids: record.use_address = record.name + def action_update_contract(self): + contract_ids = self.env["property.lease.contract"].browse(self._context.get('active_ids', self._context.get('active_id'))) + for record in contract_ids: + record.write({ + 'condition':'new', + }) + + def action_copy_record1(self): for record in self: contract_id = self.env['property.lease.contract'].create({ @@ -530,7 +539,7 @@ class PropertyLeaseContract(models.Model): 'contract_date': record.contract_date, 'lessee_id': record.lessee_id.id, 'use_address': record.use_address, - 'state':'new', + 'condition':'new', 'admin_id': record.admin_id.id, 'company_id':record.company_id.id, 'rental_purposes': record.rental_purposes.id, diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index c0f3ba056..476b1c26c 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -28,7 +28,6 @@ string="生成租金费用"/>