From cebbbe9aca2a1fb4ef27a3fb4da0bd80fe45c314 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 27 Nov 2025 14:31:22 +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
---
yuthon_issue/models/issue_approval.py | 4 +--
.../models/property_intention_information.py | 4 +--
.../views/property_intention_information.xml | 4 +--
.../data/property_contract_time.xml | 13 ---------
.../models/inherit_yuthon_property.py | 28 -------------------
.../models/property_eligibility.py | 10 ++++---
.../views/property_eligibility.xml | 8 ++++--
.../property_reconciliation_wizard_views.xml | 1 -
8 files changed, 17 insertions(+), 55 deletions(-)
diff --git a/yuthon_issue/models/issue_approval.py b/yuthon_issue/models/issue_approval.py
index 2fa0a276d..7b6697368 100644
--- a/yuthon_issue/models/issue_approval.py
+++ b/yuthon_issue/models/issue_approval.py
@@ -8,7 +8,7 @@ class IssueApproval(models.Model):
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
_rec_name = 'name'
- name = fields.Text(string='标题', required=True)
+ name = fields.Char(string='标题', required=True)
code = fields.Char(string='编号', required=True, copy=False,
default=lambda self: self.env['ir.sequence'].next_by_code('issue_approval_code'))
create_time = fields.Date(string='创建日期', default=lambda self: fields.Date.today())
@@ -21,7 +21,7 @@ class IssueApproval(models.Model):
is_attend = fields.Boolean(string="是否上会", default=True)
work_end = fields.Boolean(string="结束")
issues_result = fields.Html(string="会议结果")
- issue_text = fields.Html(string="正文")
+ issue_text = fields.Text(string="正文")
documents_ids = fields.Many2many('ir.attachment', string='议题附件')
issue_approval_ids = fields.One2many('issue.approval.line', 'issue_approval_id', string="关联议题", store=True)
issue_display = fields.Text(string="议题事项")
diff --git a/yuthon_property/models/property_intention_information.py b/yuthon_property/models/property_intention_information.py
index d926cd2b0..70fae01ba 100644
--- a/yuthon_property/models/property_intention_information.py
+++ b/yuthon_property/models/property_intention_information.py
@@ -6,8 +6,8 @@ class PropertyIntentionInformation(models.Model):
_description = '意向客户列表'
name = fields.Char(string='姓名')
- card_id = fields.Many2one('documents.document', string="身份证")
- license_id = fields.Many2one('documents.document',string='营业执照')
+ card_id = fields.Many2one('ir.attachment', string="身份证")
+ license_id = fields.Many2one('ir.attachment',string='营业执照')
entity_type = fields.Selection([('person', '个人'), ('company', '企业')], string='实体类型')
phone = fields.Char(string='联系人')
phone_number = fields.Char(string='联系电话')
diff --git a/yuthon_property/views/property_intention_information.xml b/yuthon_property/views/property_intention_information.xml
index 5b430067a..02a217682 100644
--- a/yuthon_property/views/property_intention_information.xml
+++ b/yuthon_property/views/property_intention_information.xml
@@ -30,9 +30,9 @@
-
+
-
+
diff --git a/yuthon_property_approval/data/property_contract_time.xml b/yuthon_property_approval/data/property_contract_time.xml
index e64cae82e..2901db9e3 100644
--- a/yuthon_property_approval/data/property_contract_time.xml
+++ b/yuthon_property_approval/data/property_contract_time.xml
@@ -40,17 +40,4 @@
-1
-
- 定时任务:更新合同违约金
-
- code
- model.contract_penalty()
-
-
- 1
- days
-
- -1
-
-
\ No newline at end of file
diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py
index d505f9e4e..2ef2ce00f 100644
--- a/yuthon_property_approval/models/inherit_yuthon_property.py
+++ b/yuthon_property_approval/models/inherit_yuthon_property.py
@@ -345,34 +345,6 @@ class PropertyBankStatements(models.Model):
lines_to_delete.unlink()
statement.contract_ids = [(5,)]
- def contract_penalty(self):
- statements_ids = self.env['property.bank.statements'].search([('is_put', '=', True)])
- for record in statements_ids:
- self._handle_contract_penalty(record)
-
- # 违约金计算
- def _handle_contract_penalty(self, record):
- '''
- 处理合同违约金
- :param record: property.bank.statements 记录
- :return:
- '''
- for contract_id in record.contract_ids:
- receivable_id = self.env['property.accounts.receivable'].search([('contract_id', '=', contract_id.id)])
- if receivable_id:
- dt = datetime.strptime(str(record.start_time), '%Y-%m-%d %H:%M:%S').date() # 流水交易时间
- due = datetime.strptime(str(receivable_id.due_date), '%Y-%m-%d').date() + relativedelta(months=1, day=1) # 应收日期
- # 判断是否违约
- if receivable_id.submitted and not receivable_id.is_reconciliation or not receivable_id.is_suspend:
- original_amount = (due - dt).days * (receivable_id.original_amount - record.original_amount) * int(receivable_id.percentage_liquidated_damages.name)
- self.env['property.penalty.list'].create({
- 'contract_id': contract_id.id,
- 'property_id': contract_id.lease_ids[0].address_id.id,
- 'lessee_id': contract_id.lessee_id.id,
- 'original_amount': original_amount
- })
- receivable_id.is_reconciliation = True
-
def _get_reconciliation_vals(self, record, contract_ids, is_equity=False):
if record.name:
collection_type_map = {
diff --git a/yuthon_property_approval/models/property_eligibility.py b/yuthon_property_approval/models/property_eligibility.py
index 71980afaa..35c39bc1b 100644
--- a/yuthon_property_approval/models/property_eligibility.py
+++ b/yuthon_property_approval/models/property_eligibility.py
@@ -15,7 +15,7 @@ class PropertyEligibility(models.Model):
default=lambda self: self.env['ir.sequence'].next_by_code('property_eligibility_code'))
property_documents_ids = fields.Many2many('documents.document', string="承租资格文件")
eligibility_ids = fields.One2many('property.eligibility.line', 'eligibility_id', string="意向客户明细")
- sincerity_gold = fields.Float(string="诚意金")
+ sincerity_gold = fields.Float(string="交易保证金")
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
is_issues = fields.Boolean(string='是否上会')
@@ -39,6 +39,8 @@ class PropertyEligibilityLine(models.Model):
_description = '承租方明细行'
eligibility_id = fields.Many2one('property.eligibility', string="关联承租资格审批")
- prospective_customers = fields.Char(string="意向客户")
- id_card_id = fields.Many2one('documents.document',string='身份证')
- license_id = fields.Many2one('documents.document',string='营业执照')
\ No newline at end of file
+ prospective_customers_id = fields.Many2one('property.intention.information', string="意向客户")
+ card_id = fields.Many2one(related='prospective_customers_id.card_id', string='身份证')
+ license_id = fields.Many2one(related='prospective_customers_id.license_id', string='营业执照')
+ entity_type = fields.Selection(related='prospective_customers_id.entity_type',string='实体类型')
+ phone_number = fields.Char(related='prospective_customers_id.phone_number', string="联系电话")
\ No newline at end of file
diff --git a/yuthon_property_approval/views/property_eligibility.xml b/yuthon_property_approval/views/property_eligibility.xml
index 4e922749a..4662bdcdc 100644
--- a/yuthon_property_approval/views/property_eligibility.xml
+++ b/yuthon_property_approval/views/property_eligibility.xml
@@ -56,9 +56,11 @@
-
-
-
+
+
+
+
+
diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard_views.xml b/yuthon_property_approval/wizard/property_reconciliation_wizard_views.xml
index 157ad1ca2..33faf088b 100644
--- a/yuthon_property_approval/wizard/property_reconciliation_wizard_views.xml
+++ b/yuthon_property_approval/wizard/property_reconciliation_wizard_views.xml
@@ -20,7 +20,6 @@
-