From 8b422b0f30ba7282cf87aebf747956a43a7d8e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Tue, 19 May 2026 10:48:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=B6=E8=A1=8C=E6=B5=81=E6=B0=B4=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=EF=BC=8C=E5=BB=BA=E8=AE=BE=E5=B7=A5=E7=A8=8B=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_property/wizard/property_statements_wizard.py | 9 ++++++--- .../models/property_supervising_approval.py | 2 +- .../views/property_supervising_approval_views.xml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/yuthon_property/wizard/property_statements_wizard.py b/yuthon_property/wizard/property_statements_wizard.py index b5a585919..e2b97895d 100644 --- a/yuthon_property/wizard/property_statements_wizard.py +++ b/yuthon_property/wizard/property_statements_wizard.py @@ -272,11 +272,12 @@ class PropertyStatementsWizard(models.Model): 'extract': extract, 'remake': remake, 'company_id': company_id.id, - 'bank_state': 'not_reconciled', } if not existing_record: + bank_data['bank_state'] = 'not_reconciled' self.env['property.bank.statements'].create(bank_data) else: + # 已存在记录,不修改 bank_state existing_record.write(bank_data) def property_bank_statements_dj_data(self, row, your_own_account): @@ -352,11 +353,12 @@ class PropertyStatementsWizard(models.Model): 'extract': extract, 'remake': remake, 'company_id': company_id.id, - 'bank_state': 'not_reconciled', } if not existing_record: + bank_data['bank_state'] = 'not_reconciled' self.env['property.bank.statements'].create(bank_data) else: + # 已存在记录,不修改 bank_state existing_record.write(bank_data) def property_bank_statements_gc_data(self, row): @@ -528,11 +530,12 @@ class PropertyStatementsWizard(models.Model): 'start_time': start_time - timedelta(hours=8) if start_time else False, 'remake': remake, 'company_id': company_id.id, - 'bank_state': 'not_reconciled', } if not existing_record: + bank_data['bank_state'] = 'not_reconciled' self.env['property.bank.statements'].create(bank_data) else: + # 已存在记录,不修改 bank_state existing_record.write(bank_data) def _get_company_by_unit(self, unit_name): diff --git a/yuthon_property_approval/models/property_supervising_approval.py b/yuthon_property_approval/models/property_supervising_approval.py index f16475855..c648710b0 100644 --- a/yuthon_property_approval/models/property_supervising_approval.py +++ b/yuthon_property_approval/models/property_supervising_approval.py @@ -22,7 +22,7 @@ class PropertySupervisingApproval(models.Model): budget_list_id = fields.Many2one('ir.attachment', string="预算清单") property_address = fields.Char(string='物业地址') reason = fields.Text(string="正文") - image = fields.Binary(string="开工前图片") + image = fields.Many2one('ir.attachment', string="开工前图片") contract_id = fields.Many2one('ir.attachment', string="合同") start_date = fields.Date(string="开始日期") project_content = fields.Char(string="工程内容") diff --git a/yuthon_property_approval/views/property_supervising_approval_views.xml b/yuthon_property_approval/views/property_supervising_approval_views.xml index 389373681..85bb68e86 100644 --- a/yuthon_property_approval/views/property_supervising_approval_views.xml +++ b/yuthon_property_approval/views/property_supervising_approval_views.xml @@ -53,7 +53,7 @@ - +