From 7411f0f1f396097ba95e116887648ea8c3ee6341 Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Thu, 9 Jan 2025 18:15:43 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../models/property_lease_contract.py | 10 +++--
.../views/property_lease_contract.xml | 37 +++++++++++++++----
2 files changed, 36 insertions(+), 11 deletions(-)
diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py
index 974dea2ba..01047cfa0 100644
--- a/yuthon_property_approval/models/property_lease_contract.py
+++ b/yuthon_property_approval/models/property_lease_contract.py
@@ -76,7 +76,7 @@ class PropertyLeaseContract(models.Model):
cycle_dict =fields.Selection([('monthly','月度'), ('quarter','季度'), ('half','半年'),('year','年度')],string='付款方式', default='monthly', help="应收")
cycle_mode = fields.Selection([('fixed_monthly','合同月'), ('floating_monthly','自然月'), ('fixed_quarter', '合同季'), ('floating_quarter', '自然季'),
('fixed_year', '合同年'), ('floating_year', '自然年')], string='周期方式', default='fixed_monthly')
- expected_reminders = fields.Char(string="逾期提醒")
+ expected_reminders = fields.Char(string="逾期提醒", default=25)
increment_method = fields.Selection([('percentage','百分比'),('increment_price','递增单价'),('increment_amount','递增金额')], string='每月递增', default='percentage')
increment_percentage = fields.Float(string="递增百分比")
@@ -84,7 +84,7 @@ class PropertyLeaseContract(models.Model):
increment_amount = fields.Float(string="递增金额")
increment_value = fields.Float(string="递增值")
- first_years_begin = fields.Integer(string="第几年开始")
+ first_years_begin = fields.Integer(string="第几年开始", default=2)
increments_every_few_years = fields.Integer(string="每几年递增")
rent_free_period = fields.Datetime(string="免租期")
@@ -1051,12 +1051,16 @@ class PropertyRentBreakdownLine(models.Model):
breakdown_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
charges = fields.Char(string="收费项")
unit_price = fields.Float(string="单价")
- monthly_amount = fields.Float(string="月租金", digits=(16, 0))
+ monthly_amount = fields.Float(string="月租金", digits=(16, 2))
start_data = fields.Date(string="开始日期")
end_data = fields.Date(string="结束日期")
month_number = fields.Integer(string="期间月数")
period_rent = fields.Float(string="期间租金", digits=(16, 0))
+ @api.onchange('monthly_amount')
+ def _onchange_monthly_amount(self):
+ if self.monthly_amount:
+ self.period_rent = self.monthly_amount * self.month_number
class PropertyWaterFeeLine(models.Model):
_name = 'property.water.fee.line'
diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml
index c6f615497..dcbafcaca 100644
--- a/yuthon_property_approval/views/property_lease_contract.xml
+++ b/yuthon_property_approval/views/property_lease_contract.xml
@@ -188,7 +188,6 @@