From 08b9224cefbd8324658fe67d25e64e129760e02f Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Mon, 17 Mar 2025 18:51:05 +0800
Subject: [PATCH 1/2] =?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_property/models/yuthon_property.py | 2 ++
.../models/yuthon_resource_mgmt_config.py | 16 ++++++++++
yuthon_property/security/ir.model.access.csv | 4 ++-
yuthon_property/views/menuitem.xml | 4 +++
.../views/yuthon_property_views.xml | 12 +++++++
.../yuthon_resource_mgmt_config_views.xml | 31 +++++++++++++++++++
6 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py
index 364ccb931..77b40b9de 100644
--- a/yuthon_property/models/yuthon_property.py
+++ b/yuthon_property/models/yuthon_property.py
@@ -65,6 +65,8 @@ class YuthonProperty(models.Model):
equity_area = fields.Float(string="产权面积", group_operator=None, digits=(16, 4))
decoration_type = fields.Selection([('blank', '毛坯'), ('hardcover', '精装'), ('brands', '简装'), ('rsz', '豪装')],
string="装修类型")
+ feature_ids = fields.Many2many('feature.setting', string="特色")
+ major_ids = fields.One2many('major.event.setting', 'yuthon_property_id', string="重大事项明细行")
water_meter_ids = fields.One2many('yuthon.property.water', 'yuthon_property_id', string='水表列表')
energy_meter_ids = fields.One2many('yuthon.property.energy', 'yuthon_property_id', string='电表列表')
title_information_ids = fields.One2many('title.information.line', 'yuthon_property_id', string='关联产权信息明细行')
diff --git a/yuthon_property/models/yuthon_resource_mgmt_config.py b/yuthon_property/models/yuthon_resource_mgmt_config.py
index 4c7754dcd..b422e4f4a 100644
--- a/yuthon_property/models/yuthon_resource_mgmt_config.py
+++ b/yuthon_property/models/yuthon_resource_mgmt_config.py
@@ -195,3 +195,19 @@ class RentFreeLine(models.Model):
minimum_area = fields.Float(string="最小面积")
maximum_area = fields.Float(string="最大面积")
rent_fee_date = fields.Integer(string="免租期不超过")
+
+class FeatureSetting(models.Model):
+ _name = 'feature.setting'
+ _description = '特色配置'
+
+ name = fields.Char(string="名称")
+
+class MajorEventSetting(models.Model):
+ _name = 'major.event.setting'
+ _description = '重大事项配置'
+
+ yuthon_property_id = fields.Many2one('yuthon.property', string="关联物业")
+ name = fields.Char(string="名称")
+ inspector_html = fields.Html(string="内容")
+ documents_ids = fields.Many2many('ir.attachment', string="附件")
+ start_date = fields.Date(string="生效日期", default=fields.Date.today())
diff --git a/yuthon_property/security/ir.model.access.csv b/yuthon_property/security/ir.model.access.csv
index 13f52c030..8d907349e 100644
--- a/yuthon_property/security/ir.model.access.csv
+++ b/yuthon_property/security/ir.model.access.csv
@@ -79,4 +79,6 @@ access_property_subject_form,property_subject_form,model_property_subject_form,b
access_yuthon_premises_setting,yuthon_premises_setting,model_yuthon_premises_setting,base.group_user,1,1,1,1
access_rent_free_setting,rent_free_setting,model_rent_free_setting,base.group_user,1,1,1,1
access_yuthon_reference_conditions,yuthon_reference_conditions,model_yuthon_reference_conditions,base.group_user,1,1,1,1
-access_rent_free_line,rent_free_line,model_rent_free_line,base.group_user,1,1,1,1
\ No newline at end of file
+access_rent_free_line,rent_free_line,model_rent_free_line,base.group_user,1,1,1,1
+access_feature_setting,feature_setting,model_feature_setting,base.group_user,1,1,1,1
+access_major_event_setting,major_event_setting,model_major_event_setting,base.group_user,1,1,1,1
\ No newline at end of file
diff --git a/yuthon_property/views/menuitem.xml b/yuthon_property/views/menuitem.xml
index c5c1ea804..c26553cb5 100644
--- a/yuthon_property/views/menuitem.xml
+++ b/yuthon_property/views/menuitem.xml
@@ -340,6 +340,10 @@
action="view_yuthon_property_produce_action" sequence="80"/>
+
+
+
@@ -200,6 +201,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yuthon_property/views/yuthon_resource_mgmt_config_views.xml b/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
index b92e12fc0..2eedd0c44 100644
--- a/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
+++ b/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
@@ -337,4 +337,35 @@
rent.free.setting
tree,form
+
+ feature.setting.tree
+ feature.setting
+
+
+
+
+
+
+
+ 特色配置
+ feature.setting
+ tree
+
+
+ major.event.setting.tree
+ major.event.setting
+
+
+
+
+
+
+
+
+
+
+ 重大事项配置
+ major.event.setting
+ tree
+
From 3305b800ef1c24a702fd107577d6fb69a1ad45ca Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Mon, 17 Mar 2025 18:56:46 +0800
Subject: [PATCH 2/2] =?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_official_incoming_normal_views.xml | 1 +
yuthon_property/models/yuthon_property.py | 14 ++++++++++++--
.../models/yuthon_resource_mgmt_config.py | 1 -
yuthon_property/security/ir.model.access.csv | 3 ++-
yuthon_property/views/yuthon_property_views.xml | 2 +-
5 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/yuthon_official/views/yuthon_official_incoming_normal_views.xml b/yuthon_official/views/yuthon_official_incoming_normal_views.xml
index a4a47cc7a..820766135 100644
--- a/yuthon_official/views/yuthon_official_incoming_normal_views.xml
+++ b/yuthon_official/views/yuthon_official_incoming_normal_views.xml
@@ -50,6 +50,7 @@
+
diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py
index 77b40b9de..ae2332cbb 100644
--- a/yuthon_property/models/yuthon_property.py
+++ b/yuthon_property/models/yuthon_property.py
@@ -66,7 +66,7 @@ class YuthonProperty(models.Model):
decoration_type = fields.Selection([('blank', '毛坯'), ('hardcover', '精装'), ('brands', '简装'), ('rsz', '豪装')],
string="装修类型")
feature_ids = fields.Many2many('feature.setting', string="特色")
- major_ids = fields.One2many('major.event.setting', 'yuthon_property_id', string="重大事项明细行")
+ major_ids = fields.One2many('yuthon.major.event.line', 'yuthon_property_id', string="重大事项明细行")
water_meter_ids = fields.One2many('yuthon.property.water', 'yuthon_property_id', string='水表列表')
energy_meter_ids = fields.One2many('yuthon.property.energy', 'yuthon_property_id', string='电表列表')
title_information_ids = fields.One2many('title.information.line', 'yuthon_property_id', string='关联产权信息明细行')
@@ -410,4 +410,14 @@ class YuthonReferenceConditions(models.Model):
rent_id = fields.Many2one('rent.free.setting', string="办法")
start_lease_period = fields.Selection(selection=[(str(i), str(i)) for i in range(1, 7)], string='租期开始', default='1')
end_lease_period = fields.Selection(selection=[(str(i), str(i)) for i in range(1, 7)], string='租期结束', default='6')
- annual_increase_percentage = fields.Float(string='每年递增(%)', igits=(6, 2))
\ No newline at end of file
+ annual_increase_percentage = fields.Float(string='每年递增(%)', igits=(6, 2))
+
+class YuthonMajorEventLine(models.Model):
+ _name = 'yuthon.major.event.line'
+ _description = '重大事件'
+
+ yuthon_property_id = fields.Many2one('yuthon.property', string="关联物业信息")
+ major_id = fields.Many2one('major.event.setting', string="重大事件")
+ inspector_html = fields.Html(related='major_id.inspector_html', string="内容")
+ documents_ids = fields.Many2many(related='major_id.documents_ids', string="附件")
+ start_date = fields.Date(related='major_id.start_date')
diff --git a/yuthon_property/models/yuthon_resource_mgmt_config.py b/yuthon_property/models/yuthon_resource_mgmt_config.py
index b422e4f4a..ed23c01f9 100644
--- a/yuthon_property/models/yuthon_resource_mgmt_config.py
+++ b/yuthon_property/models/yuthon_resource_mgmt_config.py
@@ -206,7 +206,6 @@ class MajorEventSetting(models.Model):
_name = 'major.event.setting'
_description = '重大事项配置'
- yuthon_property_id = fields.Many2one('yuthon.property', string="关联物业")
name = fields.Char(string="名称")
inspector_html = fields.Html(string="内容")
documents_ids = fields.Many2many('ir.attachment', string="附件")
diff --git a/yuthon_property/security/ir.model.access.csv b/yuthon_property/security/ir.model.access.csv
index 8d907349e..3acb3e977 100644
--- a/yuthon_property/security/ir.model.access.csv
+++ b/yuthon_property/security/ir.model.access.csv
@@ -81,4 +81,5 @@ access_rent_free_setting,rent_free_setting,model_rent_free_setting,base.group_us
access_yuthon_reference_conditions,yuthon_reference_conditions,model_yuthon_reference_conditions,base.group_user,1,1,1,1
access_rent_free_line,rent_free_line,model_rent_free_line,base.group_user,1,1,1,1
access_feature_setting,feature_setting,model_feature_setting,base.group_user,1,1,1,1
-access_major_event_setting,major_event_setting,model_major_event_setting,base.group_user,1,1,1,1
\ No newline at end of file
+access_major_event_setting,major_event_setting,model_major_event_setting,base.group_user,1,1,1,1
+access_yuthon_major_event_line,yuthon_major_event_line,model_yuthon_major_event_line,base.group_user,1,1,1,1
\ No newline at end of file
diff --git a/yuthon_property/views/yuthon_property_views.xml b/yuthon_property/views/yuthon_property_views.xml
index 52691e1c2..61ae3cdb0 100644
--- a/yuthon_property/views/yuthon_property_views.xml
+++ b/yuthon_property/views/yuthon_property_views.xml
@@ -205,7 +205,7 @@
-
+