Files
gzth/yuthon_property/models/property_summary_report.py
T
2025-04-17 21:04:26 +08:00

29 lines
1.7 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from email.policy import default
from odoo import models, fields, api, exceptions, _
from odoo.exceptions import UserError, ValidationError
class PropertySummaryReport(models.Model):
_name = 'property.summary.report'
_description = '物业汇总报表'
_rec_name = 'property_id'
property_id = fields.Many2one('yuthon.property', string="物业地址")
registered_id = fields.Many2one(related='property_id.registered_id', string='证载用途')
evaluation_area = fields.Float(related='property_id.rent_area', string='出租面积(m²)')
lease_expiration_date = fields.Date(string='租赁到期日')
lessee_id = fields.Many2one('property.tenant.information', string='原租户')
now_rent_price = fields.Float(related='property_id.rental_unit_price', string='现租价(元/m² •月)')
appraisal_price = fields.Float(string='评估价(元/m² •月)')
evaluation_id = fields.Many2one('evaluation.company', string='公司')
active = fields.Boolean('Active', default=True, tracking=True)
work_end = fields.Boolean(string="结束")
initial_low_area_price = fields.Float() # 初始底价
low_area_price = fields.Float(string='底价(元/m² •月)', default=lambda self: self.appraisal_price)
low_price = fields.Float(string='底价(元/月)', compute='_compute_low_price', store=True)
lease_period = fields.Integer(string='租赁期限(<=)')
annual_increase_percentage = fields.Float(string='每年递增(%)', igits=(6, 2))
rental_purposes = fields.Many2one('yuthon.rental.purpose', string="出租用途")
rent_period = fields.Integer(string="免租期(<=)")
amount_way = fields.Many2one('amount.way', string="交易方式")