36 lines
1.4 KiB
Python
36 lines
1.4 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import models, fields, api, exceptions, _
|
|
|
|
|
|
class PropertyApproval(models.Model):
|
|
_name = 'property.approval'
|
|
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin']
|
|
_description = '新增物业审批'
|
|
|
|
name = fields.Char(string='标题')
|
|
tip_description = fields.Html('正文')
|
|
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_approval_code'))
|
|
property_documents_ids = fields.Many2many('documents.document', string="附件")
|
|
source = fields.Char(string="来源")
|
|
|
|
property_massage_ids = fields.One2many('property.approval.line', 'property_approval_id', string="审批信息")
|
|
|
|
|
|
class PropertyApprovalLine(models.Model):
|
|
_name = 'property.approval.line'
|
|
_description = '新增物业审批信息'
|
|
|
|
property_approval_id = fields.Many2one('property.approval', string="审批信息")
|
|
property_address = fields.Char(string="物业地址")
|
|
is_affirmation = fields.Boolean(string="是否确权")
|
|
owner = fields.Char(string="权属人")
|
|
title_number = fields.Char(string="产权编号")
|
|
area = fields.Float(string="面积")
|
|
purposes = fields.Char(string="用途")
|
|
state = fields.Selection([('rental','出租中'), ('vacant', '空置中'), ('rented', '待出租')], string="状态")
|
|
|
|
|
|
|