46 lines
1.7 KiB
Python
46 lines
1.7 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 PropertyEquity(models.Model):
|
|
_name = 'property.equity'
|
|
_description = '物业产权变更'
|
|
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
|
|
|
|
|
name = fields.Char(string='名字')
|
|
department_id = fields.Many2one("hr.department", string="部门", required=True)
|
|
applicant = fields.Many2one("hr.employee", string="申请人", required=True)
|
|
original_property_name = fields.Char(string='原物业名称')
|
|
original_certificate_number = fields.Char(string='原产权证号')
|
|
original_are = fields.Float(string='原面积')
|
|
original_owner = fields.Char(string='原权属人')
|
|
original_get = fields.Char(string="取得方式")
|
|
start_date = fields.Date(string="生效日期")
|
|
|
|
new_property_name = fields.Char(string='新物业名称')
|
|
new_certificate_number = fields.Char(string='新产权证号')
|
|
new_are = fields.Float(string='新面积')
|
|
new_get = fields.Char(string="取得方式")
|
|
new_equity = fields.Char(string="新产权")
|
|
new_owner = fields.Char(string='新权属人')
|
|
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
|
|
default='normal')
|
|
active = fields.Boolean('Active', default=True, tracking=True)
|
|
work_end = fields.Boolean(string="结束")
|
|
|
|
def _get_default_name_title(self):
|
|
return self._description if self._description else self._name
|
|
|
|
name_title = fields.Char(default=_get_default_name_title)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|