Files
gzth/yuthon_property_approval/models/property_lease_contract.py
T
2024-10-10 15:49:37 +08:00

110 lines
5.6 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 PropertyLeaseContract(models.Model):
_name = 'property.lease.contract'
_description = '租赁合同审批'
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin']
_rec_name = 'name'
name = fields.Char(string='标题')
code = fields.Char(string="合同编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_lease_contract_code'))
property_documents_ids = fields.Many2many('documents.document', string="租赁合同文件")
lessor = fields.Char(string="出租方")
lessee = fields.Char(string="承租方")
#承租方的个人信息
contact = fields.Char(string="联系人")
phone = fields.Char(string="联系电话")
email = fields.Char(string="电子邮箱")
invoicing_type = fields.Selection([('spot', '专票'), ('cape', '普票')], string="开票类型")
rental_purposes = fields.Char(string="出租用途")
invoicing_begins = fields.Char(string="开票开头")
tax_number = fields.Char(string="税号")
industry = fields.Char(string="行业")
address_for_delivery = fields.Char(string="送达地址")
lease_term = fields.Char(string="租期")
cycle_dict =fields.Selection([('monthly','月度'), ('quarter','季度'), ('half','半年'),('year','年度')],string='付款方式')
cycle_mode = fields.Selection([('fixed','合同月'), ('floating','自然月')],string='周期方式')
expected_reminders = fields.Char(string="逾期提醒")
increment_method = fields.Selection([('percentage','百分比'),('increment_price','递增单价'),('increment_amount','递增金额')], string='每月递增')
rent_free_period = fields.Char(string="免租期")
breach_time = fields.Date(string="违约计算时点")
percentage_liquidated_damages = fields.Char(string="违约金比例")
date_of_payment = fields.Date(string="每月支付日期")
unit_price = fields.Float(string="单价")
management_fee = fields.Float(string="管理费")
water = fields.Float(string="水费")
tariff = fields.Float(string="电费")
deposit = fields.Float(string="押金/履约保证金")
first_year_rent = fields.Float(string="首年租金")
total_contract_receivables = fields.Float(string="合同应收")
tax_rate = fields.Float(string="税率")
not_tax_amount = fields.Float(string="不含税价")
tax = fields.Float(string="税金")
miscellaneous = fields.Char(string="其他约定")
lease_ids = fields.One2many('property.lease.contract.line', 'lease_id',string="租赁信息明细行")
breakdown_ids = fields.One2many('property.rent.breakdown.line', 'breakdown_id', string="物业租金明细行")
fee_ids = fields.One2many('property.meter.fee.line', 'fee_id', string="物业仪表费明细行")
other_ids = fields.One2many('property.other.fee.line', 'other_id', string="其他费用明细行")
# 附件
license_id = fields.Many2one('documents.document', string="营业执照")
card_id = fields.Many2one('documents.document', string="身份证")
legal_entity_id = fields.Many2one('documents.document', string="法人身份证")
power_attorney_id = fields.Many2one('documents.document', string="授权委托书")
handle_cards_id = fields.Many2one('documents.document', string="经办人身份证")
confirmation_transaction_id = fields.Many2one('documents.document', string="交易确认书")
responsibility_book_id = fields.Many2one('documents.document', string="安全生产责任书")
contract_id = fields.Many2one('documents.document', string="合同")
safety_id = fields.Many2one('documents.document', string="安全生产")
contract_time = fields.Date(string="合同签订日期")
handover_time = fields.Date(string="交接日期")
class PropertyLeaseContractLine(models.Model):
_name = 'property.lease.contract.line'
_description = '物业列表明细行'
lease_id = fields.Many2one('property.lease.contract', string="关联凭租合同审批")
property_address = fields.Char(string="物业地址")
property_area = fields.Float(string="面积")
evaluate_unit_price = fields.Float(string="评估单价")
class PropertyRentBreakdownLine(models.Model):
_name = 'property.rent.breakdown.line'
_description = '物业租金明细行'
breakdown_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
charges = fields.Char(string="收费项")
unit_price = fields.Float(string="单价")
monthly_amount = fields.Float(string="月租金")
start_data = fields.Date(string="开始日期")
end_data = fields.Date(string="结束日期")
month_number = fields.Integer(string="期间月数")
period_rent = fields.Float(string="期间租金")
class PropertyMeterFeeLine(models.Model):
_name = 'property.meter.fee.line'
_description = '物业仪表费明细行'
fee_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
charges = fields.Char(string="收费项")
fees = fields.Char(string="收费标准")
proportional = fields.Float(string="赔率/比例")
start_data = fields.Date(string="开始日期")
end_data = fields.Date(string="结束日期")
class PropertyOtherFeeLine(models.Model):
_name = 'property.other.fee.line'
_description = '物业其他费用明细行'
other_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
charges = fields.Char(string="收费项")
coping = fields.Float(string="应收")
coping_time = fields.Date(string="应收日期")