Merge pull request !1069 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-01-02 12:46:47 +00:00
committed by Gitee
7 changed files with 37 additions and 39 deletions
+1 -3
View File
@@ -18,7 +18,6 @@ class YuthonProperty(models.Model):
building_area = fields.Float(string="建筑面积")
title_deed = fields.Char(string="产权证编号")
actual_area = fields.Float(string="实际面积", digits=(16, 4))
effective_date = fields.Date(string="生效日期")
property_source = fields.Selection([('cut', '划入'), ('self', '自建'),
('replace', '置换'), ('buy', '购入'),
@@ -34,7 +33,6 @@ class YuthonProperty(models.Model):
property_orientation = fields.Selection([('north', '东'), ('south', '南'), ('east', '西'), ('west', '北')],
string="朝向")
street = fields.Char(string="街道")
pooled_area = fields.Float(string="公摊面积", digits=(16, 4))
state = fields.Selection([('to', '待评估'), ('done', '已评估'), ('ing', '评估中'),
('ing_handover', '移交中'), ('done_handover', '已移交'),
('filing', '备案中'), ('net', '挂网'), ('signing', '签约中'),
@@ -318,7 +316,7 @@ class ManageInformationLine(models.Model):
yuthon_property_id = fields.Many2one('yuthon.property', string="关联物业信息")
purpose_id = fields.Many2one('yuthon.resource.purpose', string="管理类型")
precinct_id = fields.Many2one('yuthon.precinct.message',string="所属片区")
precinct_id = fields.Many2one(related='yuthon_property_id.precinct_id',string="所属片区", readonly=False)
tenure_type = fields.Selection([('self', '自营'), ('agency', '代管')], string='权属类型')
management_area = fields.Float(string="管理面积", digits=(16, 4))
rent_area = fields.Float(string="可租面积", digits=(16, 4))
@@ -9,6 +9,8 @@ class YuthonPropertyMessage(models.Model):
name = fields.Char(string='产权地址')
owner_id = fields.Many2one('yuthon.owner.message', string="权属人")
title_certificate = fields.Char(string="产权证号")
pooled_area = fields.Float(string="公摊面积", digits=(16, 4))
ctual_area = fields.Float(string="实际面积", digits=(16, 4))
equity_area = fields.Float(string="产权面积", digits=(16, 4))
documents_ids = fields.Many2many('ir.attachment', string="附件")
@@ -50,20 +50,15 @@
<field name="lessee_id"/>
<field name="premises"/>
<field name="units"/>
<field name="house_type_id"/>
<field name="district"/>
<field name="live_room"/>
<field name="property_floor"/>
<field name="property_orientation"/>
<field name="street"/>
</group>
<group>
<field name="company_id"/>
<field name="company_id" invisible="1"/>
<field name="tenure_type"/>
<field name="precinct_id"/>
<field name="precinct_id" invisible="1"/>
<field name="asset_type_id"/>
<field name="pooled_area"/>
<field name="actual_area"/>
<field name="management_area" invisible="1"/>
<field name="rent_area" invisible="1"/>
<field name="equity_area" invisible="1"/>
@@ -72,6 +67,9 @@
<field name="purpose_id" invisible="1"/>
<field name="admin_id" invisible="1"/>
<field name="state" readonly="1"/>
<field name="house_type_id"/>
<field name="district"/>
<field name="live_room"/>
<field name="is_done_split" invisible="1"/>
<field name="is_done_merge" invisible="1"/>
</group>
@@ -23,6 +23,6 @@ class PropertyHandoverLine(models.Model):
property_address = fields.Char(related='property_id.name',string="资产名称")
is_affirmation = fields.Boolean(related='property_id.is_confirm_authorization',string="是否确权")
title_number = fields.Char(string="产权编号")
area = fields.Float(related='property_id.actual_area',string="面积")
area = fields.Float(related='property_id.rent_area',string="面积")
purposes = fields.Many2one(related='property_id.asset_type_id',string="用途")
state = fields.Selection(related='property_id.state', string="状态",)
@@ -113,33 +113,33 @@ class PropertyLeaseContract(models.Model):
responsibility_book_id = fields.Many2one('ir.attachment', string="安全生产责任书")
handover_time = fields.Date(string="交接日期")
@api.onchange("term_start_time", "term_end_time",
"increments_every_few_years", "unit_price",
"first_years_begin", "increment_method",
"increment_price", "increment_percentage", "increment_amount",
"rent_free_period_year", "rent_free_period_month", "total_area")
def onchange_first_year_rent(self):
for record in self:
if record.term_start_time and record.term_end_time:
start_date = record.term_start_time
end_date = record.term_end_time + relativedelta(days=1)
if start_date + relativedelta(months=12) < end_date:
end_date = start_date + relativedelta(months=12)
all_period_rent = record.my_compute_all_period_rent(start_date, end_date)
record.first_year_rent = all_period_rent
all_start_date = record.term_start_time
all_end_date = record.term_end_time + relativedelta(days=1)
record.total_contract_receivables = record.my_compute_all_period_rent(all_start_date, all_end_date)
# @api.onchange("term_start_time", "term_end_time",
# "increments_every_few_years", "unit_price",
# "first_years_begin", "increment_method",
# "increment_price", "increment_percentage", "increment_amount",
# "rent_free_period_year", "rent_free_period_month", "total_area")
# def onchange_first_year_rent(self):
# for record in self:
# if record.term_start_time and record.term_end_time:
# start_date = record.term_start_time
# end_date = record.term_end_time + relativedelta(days=1)
# if start_date + relativedelta(months=12) < end_date:
# end_date = start_date + relativedelta(months=12)
# all_period_rent = record.my_compute_all_period_rent(start_date, end_date)
# record.first_year_rent = all_period_rent
# all_start_date = record.term_start_time
# all_end_date = record.term_end_time + relativedelta(days=1)
# record.total_contract_receivables = record.my_compute_all_period_rent(all_start_date, all_end_date)
@api.onchange("lease_term_year", "lease_term_month", "term_start_time")
def onchange_lease_term_year(self):
for record in self:
if record.lease_term_year or record.lease_term_month:
if record.term_start_time:
year = record.lease_term_year if record.lease_term_year else 0
month = record.lease_term_month if record.lease_term_month else 0
months = year * 12 + month
record.term_end_time = record.term_start_time + relativedelta(months=months) - relativedelta(days=1)
# @api.onchange("lease_term_year", "lease_term_month", "term_start_time")
# def onchange_lease_term_year(self):
# for record in self:
# if record.lease_term_year or record.lease_term_month:
# if record.term_start_time:
# year = record.lease_term_year if record.lease_term_year else 0
# month = record.lease_term_month if record.lease_term_month else 0
# months = year * 12 + month
# record.term_end_time = record.term_start_time + relativedelta(months=months) - relativedelta(days=1)
@staticmethod
def divide_time_range_fixed(start_time, end_time, months):
@@ -9,7 +9,7 @@ class PropertyOfflineRegistration(models.Model):
next_by_code('property_offline_registration_code'))
property_id = fields.Many2one('yuthon.property',string='物业名称')
address = fields.Char(related='property_id.name',string='物业地址')
area = fields.Float(related='property_id.actual_area',string='面积(m²)')
area = fields.Float(related='property_id.rent_area',string='面积(m²)')
rental_price = fields.Float(string='租金底价(元/m²)')
monthly_rent = fields.Float(string='月租金(元)')
increment_rate = fields.Char(string='递增率')
@@ -10,7 +10,7 @@ class PropertyRentalConditions(models.Model):
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].
next_by_code('property_rental_conditions_code'))
registered_use = fields.Char(related='property_id.registered_use',string='证载用途')
evaluation_area = fields.Float(related='property_id.actual_area',string='出租面积(m²)')
evaluation_area = fields.Float(related='property_id.rent_area',string='出租面积(m²)')
lease_expiration_date = fields.Date(string='租赁到期日')
now_rent_price = fields.Float(related='property_id.current_rent',string='现租价(元/m² •月)')
appraisal_price = fields.Float(string='评估价(元/m² •月)')