From 1276f76f248e8faa110a91e50d90dfad9baa8ca9 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 2 Jan 2025 11:51:55 +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 | 11 ++- .../views/property_lease_contract.xml | 89 +++++++++---------- .../wizard/property_contract_wizard.py | 1 + .../views/yuthon_will_task_views.xml | 2 + 4 files changed, 52 insertions(+), 51 deletions(-) diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 8f3bdaa28..533b77ac0 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -32,6 +32,7 @@ class PropertyLeaseContract(models.Model): code = fields.Char(string="流水号", default=lambda self: self.env['ir.sequence'].next_by_code('property_lease_contract_code')) admin_id = fields.Many2one('res.users', string="管理员") contract_code = fields.Char(string="合同编号") + contract_date = fields.Date(string="合同签订日期") property_documents_ids = fields.Many2many('ir.attachment', string="租赁合同文件") company_id = fields.Many2one('yuthon.property.company', string="出租方") rent_company = fields.Char(related='company_id.name', string="收租公司名称") @@ -55,8 +56,8 @@ class PropertyLeaseContract(models.Model): # lease_term_year_uom = fields.Selection([('year', '年')], default="year", readonly=True, string="免租期单位") lease_term_month = fields.Integer(string="租期(月)") # lease_term_month_uom = fields.Selection([('month', '月')], default="month", readonly=True, string="免租期单位") - term_start_time = fields.Date(string="租期开始时间", default=fields.Datetime.now) - term_end_time = fields.Date(string="租期结束时间") + term_start_time = fields.Date(string="开始时间", default=fields.Datetime.now) + term_end_time = fields.Date(string="结束时间") cycle_dict =fields.Selection([('monthly','月度'), ('quarter','季度'), ('half','半年'),('year','年度')],string='付款方式') cycle_mode = fields.Selection([('fixed_monthly','合同月'), ('floating_monthly','自然月'), ('fixed_quarter', '合同季'), ('floating_quarter', '自然季'), ('fixed_year', '合同年'), ('floating_year', '自然年')], string='周期方式', default='fixed_monthly') @@ -70,8 +71,8 @@ class PropertyLeaseContract(models.Model): increments_every_few_years = fields.Integer(string="每几年递增") rent_free_period = fields.Datetime(string="免租期") - rent_free_period_year = fields.Integer(string="免租期") rent_free_period_month = fields.Integer(string="免租期") + rent_free_period_days = fields.Integer(string="免租期") breach_time = fields.Date(string="违约计算时点") percentage_liquidated_damages = fields.Many2one('yuthon.penalty.setting', string="违约金比例") @@ -79,8 +80,7 @@ class PropertyLeaseContract(models.Model): date_payment_day = fields.Integer(string="每日支付日期") first_pay = fields.Date(string="首次付款日") unit_price = fields.Float(string="单价") - is_deposit = fields.Boolean(string="押金") - is_performance_bonds = fields.Boolean(string="履约保证金") + deposit_type = fields.Selection([('deposit','押金'),('performance','履约保证金')], string="押金/履约保证金") deposit = fields.Float(string="押金") performance_bonds = fields.Float(string="履约保证金") performance_bonds_write = fields.Char(string="履约保证金大写") @@ -113,7 +113,6 @@ class PropertyLeaseContract(models.Model): handle_cards_id = fields.Many2one('ir.attachment', string="经办人身份证") confirmation_transaction_id = fields.Many2one('ir.attachment', string="成交确认书") responsibility_book_id = fields.Many2one('ir.attachment', string="安全生产责任书") - contract_time = fields.Date(string="合同签订日期") handover_time = fields.Date(string="交接日期") @api.onchange("term_start_time", "term_end_time", diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index e08754e1b..b16ba1d1a 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -6,13 +6,14 @@ + - - + + - + @@ -32,6 +33,24 @@ + + + + + + + + + + + + + + + + + + @@ -86,14 +105,6 @@ - - - - - - - - @@ -111,14 +122,13 @@ - - +