添加功能

This commit is contained in:
zhou
2025-03-17 18:51:05 +08:00
parent bfdf907854
commit 08b9224cef
6 changed files with 68 additions and 1 deletions
@@ -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='关联产权信息明细行')
@@ -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())
+3 -1
View File
@@ -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
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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
79 access_yuthon_premises_setting yuthon_premises_setting model_yuthon_premises_setting base.group_user 1 1 1 1
80 access_rent_free_setting rent_free_setting model_rent_free_setting base.group_user 1 1 1 1
81 access_yuthon_reference_conditions yuthon_reference_conditions model_yuthon_reference_conditions base.group_user 1 1 1 1
82 access_rent_free_line rent_free_line model_rent_free_line base.group_user 1 1 1 1
83 access_feature_setting feature_setting model_feature_setting base.group_user 1 1 1 1
84 access_major_event_setting major_event_setting model_major_event_setting base.group_user 1 1 1 1
+4
View File
@@ -340,6 +340,10 @@
action="view_yuthon_property_produce_action" sequence="80"/>
<menuitem id="yuthon_premises_setting_menu" parent="resource_mgmt_config_menu" name="楼盘配置"
action="view_yuthon_premises_setting_action" sequence="85"/>
<menuitem id="view_feature_setting_menu" parent="resource_mgmt_config_menu" name="特色配置"
action="action_feature_setting" sequence="90"/>
<menuitem id="view_action_major_event_ment" parent="resource_mgmt_config_menu" name="重大事项配置"
action="action_major_event_setting" sequence="95"/>
<menuitem
id="property_approval_my_management_menu"
@@ -85,6 +85,7 @@
<field name="property_source"/>
<field name="district"/>
<field name="live_room"/>
<field name="feature_ids" widget="many2many_tags"/>
<field name="is_done_split" invisible="1"/>
<field name="is_done_merge" invisible="1"/>
<field name="state" invisible="1"/>
@@ -200,6 +201,17 @@
</tree>
</field>
</page>
<page string="重大事项及其他披露内容">
<field name="major_ids">
<tree editable="bottom">
<field name="yuthon_property_id" column_invisible="1"/>
<field name="name"/>
<field name="inspector_html"/>
<field name="start_date"/>
<field name="documents_ids" widget="preview_many2many"/>
</tree>
</field>
</page>
<page string="拆分信息" invisible="not is_done_split">
<field name="disassembly_information_ids">
<tree editable="bottom">
@@ -337,4 +337,35 @@
<field name="res_model">rent.free.setting</field>
<field name="view_mode">tree,form</field>
</record>
<record id="view_feature_setting_tree" model="ir.ui.view">
<field name="name">feature.setting.tree</field>
<field name="model">feature.setting</field>
<field name="arch" type="xml">
<tree string="特色配置" editable="bottom">
<field name="name"/>
</tree>
</field>
</record>
<record id="action_feature_setting" model="ir.actions.act_window">
<field name="name">特色配置</field>
<field name="res_model">feature.setting</field>
<field name="view_mode">tree</field>
</record>
<record id="view_major_event_setting_tree" model="ir.ui.view">
<field name="name">major.event.setting.tree</field>
<field name="model">major.event.setting</field>
<field name="arch" type="xml">
<tree string="重大事项配置" editable="bottom">
<field name="name"/>
<field name="inspector_html"/>
<field name="start_date"/>
<field name="documents_ids" widget="preview_many2many"/>
</tree>
</field>
</record>
<record id="action_major_event_setting" model="ir.actions.act_window">
<field name="name">重大事项配置</field>
<field name="res_model">major.event.setting</field>
<field name="view_mode">tree</field>
</record>
</odoo>