@@ -28,7 +28,7 @@ class YuthonProperty(models.Model):
|
||||
current_rent = fields.Float(string="现租金")
|
||||
is_done_split = fields.Boolean(string="已拆分")
|
||||
is_done_merge = fields.Boolean(string="已合并")
|
||||
property_floor = fields.Char(string="楼层")
|
||||
property_floor_id = fields.Many2one('property.floor.setting', string="楼层")
|
||||
property_orientation = fields.Selection([('north', '东'), ('south', '南'), ('east', '西'), ('west', '北')],
|
||||
string="朝向")
|
||||
street = fields.Char(string="街道")
|
||||
|
||||
@@ -210,3 +210,11 @@ class MajorEventSetting(models.Model):
|
||||
inspector_html = fields.Html(string="内容")
|
||||
documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
start_date = fields.Date(string="生效日期", default=fields.Date.today())
|
||||
|
||||
|
||||
class PropertyFloorSetting(models.Model):
|
||||
_name = 'property.floor.setting'
|
||||
_description = '楼层配置'
|
||||
|
||||
name = fields.Char(string="名称")
|
||||
premises_id = fields.Many2one('yuthon.premises.setting', string="所属楼盘")
|
||||
@@ -82,4 +82,5 @@ access_yuthon_reference_conditions,yuthon_reference_conditions,model_yuthon_refe
|
||||
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
|
||||
access_yuthon_major_event_line,yuthon_major_event_line,model_yuthon_major_event_line,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
|
||||
access_property_floor_setting,property_floor_setting,model_property_floor_setting,base.group_user,1,1,1,1
|
||||
|
@@ -340,6 +340,8 @@
|
||||
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="action_property_floor_setting_ment" parent="resource_mgmt_config_menu" name="楼层配置"
|
||||
action="action_property_floor_setting" sequence="87"/>
|
||||
<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="重大事项配置"
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<group>
|
||||
<field name="premises_id"/>
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="property_floor"/>
|
||||
<field name="property_floor_id"/>
|
||||
<field name="units"/>
|
||||
<field name="property_orientation"/>
|
||||
<field name="street"/>
|
||||
@@ -284,6 +284,7 @@
|
||||
<header_search>
|
||||
<quick_filter string="评估状态">
|
||||
<filter string="待评估" name="state_to" domain="[('state', '=', 'to')]"/>
|
||||
<filter string="评估中" name="state_ing" domain="[('state', '=', 'ing')]"/>
|
||||
<filter string="已评估" name="state_done" domain="[('state', '=', 'done')]"/>
|
||||
</quick_filter>
|
||||
</header_search>
|
||||
|
||||
@@ -368,4 +368,19 @@
|
||||
<field name="res_model">major.event.setting</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="view_property_floor_setting_tree" model="ir.ui.view">
|
||||
<field name="name">property.floor.setting.tree</field>
|
||||
<field name="model">property.floor.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="楼层配置" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="premises_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_property_floor_setting" model="ir.actions.act_window">
|
||||
<field name="name">楼层配置</field>
|
||||
<field name="res_model">property.floor.setting</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -185,17 +185,19 @@ class YuthonPropertyWizard(models.Model):
|
||||
def yuthon_premises_id(self,row):
|
||||
property_id = self.env['yuthon.property'].search([('name', '=', row[0].value)])
|
||||
premises_id = self.env['yuthon.premises.setting'].search([('name', '=', row[1].value)])
|
||||
property_floor = row[2].value
|
||||
units = row[3].value
|
||||
property_floor_id = self.env['property.floor.setting'].search([('name', '=', row[2].value)])
|
||||
if not premises_id:
|
||||
premises_id = self.env['yuthon.premises.setting'].create({
|
||||
'name': row[1].value,
|
||||
})
|
||||
if not property_floor_id:
|
||||
property_floor_id = self.env['property.floor.setting'].create({
|
||||
'name': row[2].value,
|
||||
})
|
||||
if property_id:
|
||||
property_id.write({
|
||||
'premises_id': premises_id.id,
|
||||
'property_floor': property_floor,
|
||||
'units': units,
|
||||
'property_floor_id': property_floor_id.id,
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ class EvaluateApplicationLine(models.Model):
|
||||
|
||||
property_message_id = fields.Many2one('property.evaluate.application', string='关联评估申请')
|
||||
premises_id = fields.Many2one('yuthon.premises.setting', string="楼盘")
|
||||
property_id = fields.Many2one('yuthon.property', string="物业")
|
||||
owner_id = fields.Many2one('yuthon.owner.message', string="权属人")
|
||||
assessment_category = fields.Selection([('rent_money', '租金'), ('value', '价值')], string="评估类别")
|
||||
registered_id = fields.Many2one('yuthon.purpose.evidence', string='证载用途')
|
||||
@@ -94,8 +95,7 @@ class EvaluateApplicationLine(models.Model):
|
||||
current_status = fields.Date(string='现状(合同到期日)')
|
||||
evaluation_area = fields.Float(string='评估面积(m²)')
|
||||
remarks = fields.Text(string='备注')
|
||||
property_floor = fields.Text(string="楼层")
|
||||
units = fields.Text(string="单元")
|
||||
property_floor_id = fields.Many2one('property.floor.setting', string="楼层")
|
||||
last_hand_rent_price = fields.Float(string='上一手历史租金单价(元/m²•月)')
|
||||
gov_rent_price = fields.Float(string='政府租金参考价')
|
||||
evaluation_rent_price = fields.Float(string='评估散租单价(元/m²•月)')
|
||||
@@ -104,12 +104,10 @@ class EvaluateApplicationLine(models.Model):
|
||||
evaluation_whole_rent_total = fields.Float(string='评估总价(元•月,整租)')
|
||||
|
||||
def application_detail(self):
|
||||
domain = []
|
||||
domain = [('state', '=', 'to')]
|
||||
domain.append(('premises_id', '=', self.premises_id.id))
|
||||
if self.property_floor:
|
||||
domain.append(('property_floor', '=', self.property_floor))
|
||||
if self.units:
|
||||
domain.append(('units', '=', self.units))
|
||||
return {
|
||||
"name": _("物业"),
|
||||
"type": "ir.actions.act_window",
|
||||
@@ -117,4 +115,13 @@ class EvaluateApplicationLine(models.Model):
|
||||
"res_model": "yuthon.property",
|
||||
"target": "new", # 使动作以弹窗形式打开
|
||||
"domain": domain,
|
||||
}
|
||||
}
|
||||
|
||||
def set_property_state_to_ing(self):
|
||||
domain = [('state', '=', 'to')]
|
||||
domain.append(('premises_id', '=', self.premises_id.id))
|
||||
if self.property_floor:
|
||||
domain.append(('property_floor', '=', self.property_floor))
|
||||
property_ids = self.env['yuthon.property'].search(domain)
|
||||
for property in property_ids:
|
||||
property.write({'state': 'ing'})
|
||||
@@ -18,7 +18,7 @@ class PropertyMergeApproval(models.Model):
|
||||
# 合并后
|
||||
property_name = fields.Char(string='物业名称')
|
||||
merge_units = fields.Char(string='单元')
|
||||
merge_property_floor = fields.Char(string='楼层')
|
||||
merge_property_floor_id = fields.Many2one('property.floor.setting', string='楼层')
|
||||
merge_asset_type_id = fields.Many2one('yuthon.resource.type', string='资产类型')
|
||||
merge_building_area = fields.Float(string='建筑面积')
|
||||
merge_rent_area = fields.Float(string='可租面积')
|
||||
@@ -91,7 +91,7 @@ class PropertyMergeApprovalLine(models.Model):
|
||||
property_merge_approval_id = fields.Many2one('property.merge.approval', string='关联物业合并审批')
|
||||
property_id = fields.Many2one('yuthon.property', string='物业名称')
|
||||
units = fields.Char(related='property_id.units', string='单元')
|
||||
property_floor = fields.Char(related='property_id.property_floor', string='楼层')
|
||||
property_floor_id = fields.Many2one(related='property_id.property_floor_id', string='楼层')
|
||||
asset_type_id = fields.Many2one(related='property_id.asset_type_id', string='资产类型')
|
||||
building_area = fields.Float(related='property_id.building_area', string='建筑面积')
|
||||
rent_area = fields.Float(related='property_id.rent_area', string='可租面积')
|
||||
|
||||
@@ -12,7 +12,7 @@ class PropertySplitApproval(models.Model):
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
property_id = fields.Many2one('yuthon.property', string='物业名称')
|
||||
units = fields.Char(related='property_id.units', string='单元')
|
||||
property_floor = fields.Char(related='property_id.property_floor', string='楼层')
|
||||
property_floor_id = fields.Many2one(related='property_id.property_floor_id', string='楼层')
|
||||
asset_type_id = fields.Many2one(related='property_id.asset_type_id', string='资产类型')
|
||||
building_area = fields.Float(related='property_id.building_area', string='建筑面积')
|
||||
rent_area = fields.Float(related='property_id.rent_area', string='可租面积')
|
||||
@@ -71,7 +71,7 @@ class PropertySplitApprovalLine(models.Model):
|
||||
property_split_approval_id = fields.Many2one('property.split.approval', string='关联物业拆分审批')
|
||||
split_property = fields.Char(string='物业名称')
|
||||
split_units = fields.Char(string='单元')
|
||||
split_property_floor = fields.Char(string='楼层')
|
||||
split_property_floor_id = fields.Many2one('property.floor.setting', string='楼层')
|
||||
split_asset_type_id = fields.Many2one('yuthon.resource.type', string='资产类型')
|
||||
split_building_area = fields.Float(string='建筑面积')
|
||||
split_rent_area = fields.Float(string='可租面积')
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
<field name="property_message_id" column_invisible="1"/>
|
||||
<field name="property_ids" column_invisible="1"/>
|
||||
<field name="premises_id" required="1"/>
|
||||
<field name="property_floor"/>
|
||||
<field name="units"/>
|
||||
<field name="property_floor_id" domain="[('premises_id', '=', premises_id)]"/>
|
||||
<field name="property_id" domain="[('property_floor_id', '=', property_floor_id), ('premises_id', '=', premises_id)]"/>
|
||||
<field name="evaluation_area" string="评估面积m²"/>
|
||||
<field name="assessment_category" string="评估类别"/>
|
||||
<field name="owner_id"/>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<tree editable="bottom">
|
||||
<field name="property_id"/>
|
||||
<field name="units"/>
|
||||
<field name="property_floor"/>
|
||||
<field name="property_floor_id"/>
|
||||
<field name="asset_type_id"/>
|
||||
<field name="building_area"/>
|
||||
<field name="rent_area"/>
|
||||
@@ -76,7 +76,7 @@
|
||||
<group>
|
||||
<field name="property_name"/>
|
||||
<field name="merge_units"/>
|
||||
<field name="merge_property_floor"/>
|
||||
<field name="merge_property_floor_id"/>
|
||||
<field name="merge_asset_type_id"/>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<field name="property_id"/>
|
||||
<field name="code"/>
|
||||
<field name="units"/>
|
||||
<field name="property_floor"/>
|
||||
<field name="property_floor_id"/>
|
||||
<field name="building_area"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -60,7 +60,7 @@
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="property_id"/>
|
||||
<field name="units"/>
|
||||
<field name="property_floor"/>
|
||||
<field name="property_floor_id"/>
|
||||
<field name="asset_type_id"/>
|
||||
<field name="split_quantity"/>
|
||||
<button name="property_split_button" type="object" string="拆分" class="btn-primary"/>
|
||||
@@ -78,7 +78,7 @@
|
||||
<field name="property_split_approval_id" column_invisible="1"/>
|
||||
<field name="split_property"/>
|
||||
<field name="split_units"/>
|
||||
<field name="split_property_floor"/>
|
||||
<field name="split_property_floor_id"/>
|
||||
<field name="split_asset_type_id"/>
|
||||
<field name="split_building_area"/>
|
||||
<field name="split_rent_area"/>
|
||||
|
||||
@@ -345,26 +345,26 @@
|
||||
parent="human_resources_salary_root_board"
|
||||
action="yuthon_salary.action_view_hr_payroll_structure_list_form"
|
||||
sequence="15"/>
|
||||
<menuitem id="yuthon_salary_board"
|
||||
name="工资项"
|
||||
<!-- <menuitem id="yuthon_salary_board"-->
|
||||
<!-- name="工资项"-->
|
||||
<!-- parent="human_resources_salary_root_board"-->
|
||||
<!-- action="yuthon_salary.yuthon_payroll_board_action"-->
|
||||
<!-- sequence="16"/>-->
|
||||
<menuitem id="hr_payroll_common_board"
|
||||
name="常用项"
|
||||
parent="human_resources_salary_root_board"
|
||||
action="yuthon_salary.yuthon_payroll_board_action"
|
||||
sequence="16"/>
|
||||
<!-- <menuitem id="hr_payroll_common_board"-->
|
||||
<!-- name="常用项"-->
|
||||
<!-- parent="human_resources_salary_root_board"-->
|
||||
<!-- action="yuthon_salary.view_yuthon_payroll_common_action"-->
|
||||
<!-- sequence="20"/>-->
|
||||
<!-- <menuitem id="hr_payroll_insurance_board"-->
|
||||
<!-- name="五险一金"-->
|
||||
<!-- parent="human_resources_salary_root_board"-->
|
||||
<!-- action="yuthon_salary.view_yuthon_payroll_insurances_action"-->
|
||||
<!-- sequence="25"/>-->
|
||||
<!-- <menuitem id="hr_payroll_temporary_board"-->
|
||||
<!-- name="临时项"-->
|
||||
<!-- parent="human_resources_salary_root_board"-->
|
||||
<!-- action="yuthon_salary.view_yuthon_payroll_temporary_action"-->
|
||||
<!-- sequence="30"/>-->
|
||||
action="yuthon_salary.view_yuthon_payroll_common_action"
|
||||
sequence="20"/>
|
||||
<menuitem id="hr_payroll_insurance_board"
|
||||
name="五险一金"
|
||||
parent="human_resources_salary_root_board"
|
||||
action="yuthon_salary.view_yuthon_payroll_insurances_action"
|
||||
sequence="25"/>
|
||||
<menuitem id="hr_payroll_temporary_board"
|
||||
name="临时项"
|
||||
parent="human_resources_salary_root_board"
|
||||
action="yuthon_salary.view_yuthon_payroll_temporary_action"
|
||||
sequence="30"/>
|
||||
<menuitem id="human_pay_setting_work_setting"
|
||||
name="配置"
|
||||
parent="human_resources_salary_root_board"
|
||||
|
||||
Reference in New Issue
Block a user