From 65ecc3b05b5be448b13ce49b532fde2b88d67116 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 2 Jan 2025 20:15:52 +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 --- yuthon_property/wizard/yuthon_property_wizard.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yuthon_property/wizard/yuthon_property_wizard.py b/yuthon_property/wizard/yuthon_property_wizard.py index fdb34d392..2d4811157 100644 --- a/yuthon_property/wizard/yuthon_property_wizard.py +++ b/yuthon_property/wizard/yuthon_property_wizard.py @@ -141,7 +141,9 @@ class YuthonPropertyWizard(models.Model): company_id = self.env['yuthon.property.company'].create({ 'name': row[2].value, }) - purpose_id = self.env['yuthon.resource.purpose'].search([('name', '=', row[7].value)]) + purpose_id = self.env['yuthon.resource.purpose'].search([('name', '=', row[9].value)]) + tenure_type_dict = {'自有': 'self', '代管': 'agency', '': ''} + tenure_type = tenure_type_dict.get(row[3].value, '') admin_id = self.env['res.users'].search([('name', '=', row[4].value)]) management_area = row[6].value rent_area = row[7].value @@ -153,6 +155,7 @@ class YuthonPropertyWizard(models.Model): 'yuthon_property_id':property_id.id, 'company_id':company_id.id, 'purpose_id':purpose_id.id, + 'tenure_type':tenure_type, 'management_area':management_area, 'rent_area':rent_area, 'admin_id':admin_id.id,