from odoo import models, fields, api class YuthonProperty(models.Model): _name = 'yuthon.property' _description = '物业管理' _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] _rec_name = 'name' name = fields.Char(string="名称") property_precinct = fields.Char(string="楼盘片区") property_floor = fields.Integer(string="楼层") property_room = fields.Char(string="区") property_house = fields.Char(string="户型") property_orientation = fields.Char(string="朝向") property_use_id = fields.Integer(string="物业用途ID") property_asset_type = fields.Selection([('plant', '厂房'), ('goods', '商品'), ('office', '写字楼'), ('dormitory', '宿舍'), ('rig', '设备等管理用房')], string='资产类型') property_asset_use = fields.Selection([('hire', '出租'), ('personal', '自用')], string='资产用途') property_use_type = fields.Selection([('work', '办公'), ('dorm', '宿舍'), ('cater', '餐饮')], string='使用类型') property_use_time = fields.Datetime(string="使用年限") property_rent_type = fields.Selection([('could', '可租'), ('no', '不可租'), ('done', '已租'), ('none', '空置')], string="出租状态") state_id = fields.Many2one('property.type', string='状态') property_source = fields.Selection([('cut', '划入'), ('self', '自建'), ('replace', '置换'), ('buy', '购入'), ('entrust', '委托'), ('Rent', '租入')], string='来源') image_1920 = fields.Image(string="图片") description = fields.Html(string="描述")