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 @@ - +