添加功能
This commit is contained in:
@@ -42,37 +42,6 @@
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="context">{'search_default_group_company': True, 'search_default_group_lv': True}</field>
|
||||
</record>
|
||||
<!--天河投资 -->
|
||||
<record id="view_yuthon_job_lv_tree2" model="ir.ui.view">
|
||||
<field name="name">yuthon.job.lv.tree</field>
|
||||
<field name="model">yuthon.job.lv</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="lv"/>
|
||||
<field name="name"/>
|
||||
<field name="base_wage"/>
|
||||
<field name="job_wage"/>
|
||||
<field name="post_wage"/>
|
||||
<field name="performance_bonus"/>
|
||||
<field name="phone_subsidy"/>
|
||||
<field name="attendance_bonus"/>
|
||||
<field name="all_wage"/>
|
||||
<field name="yuthon_company"/>
|
||||
<field name="create_time"/>
|
||||
<field name="end_time"/>
|
||||
<field name="company_page"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_job_lv_action2" model="ir.actions.act_window">
|
||||
<field name="name">职级管理</field>
|
||||
<field name="res_model">yuthon.job.lv</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('yuthon_company', '=', 'tz')]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_hr_employee.view_yuthon_job_lv_tree2')})]"/>
|
||||
<field name="context">{'search_default_group_company': True, 'search_default_group_lv': True}</field>
|
||||
</record>
|
||||
<!--天河物管 -->
|
||||
<record id="view_yuthon_job_lv_tree3" model="ir.ui.view">
|
||||
<field name="name">yuthon.job.lv.tree</field>
|
||||
@@ -102,37 +71,6 @@
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_hr_employee.view_yuthon_job_lv_tree3')})]"/>
|
||||
<field name="context">{'search_default_group_company': True, 'search_default_group_lv': True}</field>
|
||||
</record>
|
||||
<!--天河粮储 -->
|
||||
<record id="view_yuthon_job_lv_tree4" model="ir.ui.view">
|
||||
<field name="name">yuthon.job.lv.tree</field>
|
||||
<field name="model">yuthon.job.lv</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="lv"/>
|
||||
<field name="name"/>
|
||||
<field name="base_wage"/>
|
||||
<field name="job_wage"/>
|
||||
<field name="post_wage"/>
|
||||
<field name="performance_bonus"/>
|
||||
<field name="phone_subsidy"/>
|
||||
<field name="attendance_bonus"/>
|
||||
<field name="all_wage"/>
|
||||
<field name="yuthon_company"/>
|
||||
<field name="create_time"/>
|
||||
<field name="end_time"/>
|
||||
<field name="company_page"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_job_lv_action4" model="ir.actions.act_window">
|
||||
<field name="name">职级管理</field>
|
||||
<field name="res_model">yuthon.job.lv</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('yuthon_company', '=', 'thlc')]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_hr_employee.view_yuthon_job_lv_tree4')})]"/>
|
||||
<field name="context">{'search_default_group_company': True, 'search_default_group_lv': True}</field>
|
||||
</record>
|
||||
<!-- Menus -->
|
||||
<menuitem
|
||||
@@ -150,7 +88,7 @@
|
||||
id="menu_yuthon_job_lv_all2"
|
||||
name="天河投资职级"
|
||||
parent="menu_yuthon_job_lv"
|
||||
action="view_yuthon_job_lv_action2"
|
||||
action="view_yuthon_job_lv_action"
|
||||
sequence="3"/>
|
||||
<menuitem
|
||||
id="menu_yuthon_job_lv_all3"
|
||||
@@ -162,6 +100,6 @@
|
||||
id="menu_yuthon_job_lv_all4"
|
||||
name="天河粮储职级"
|
||||
parent="menu_yuthon_job_lv"
|
||||
action="view_yuthon_job_lv_action4"
|
||||
action="view_yuthon_job_lv_action"
|
||||
sequence="7"/>
|
||||
</odoo>
|
||||
@@ -10,3 +10,6 @@ class PropertyAssess(models.Model):
|
||||
class PropertyAssessLine(models.Model):
|
||||
_name = 'property.assess.line'
|
||||
|
||||
class PropertyType(models.Model):
|
||||
_name = 'property.type'
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from odoo import models, fields, api
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
|
||||
class YuthonProperty(models.Model):
|
||||
_name = 'yuthon.property'
|
||||
_description = '物业管理'
|
||||
@@ -32,17 +33,18 @@ class YuthonProperty(models.Model):
|
||||
pooled_area = fields.Float(string="公摊面积")
|
||||
rentable_area = fields.Float(string="可租面积")
|
||||
state = fields.Selection([('to', '待评估'), ('done', '已评估'), ('ing', '评估中'),
|
||||
('ing_handover', '移交中') ,('done_handover', '已移交'),
|
||||
('filing', '评估备案'), ('net', '挂网'), ('signing', '签约中'),
|
||||
('leased', '已出租'),('idle', '闲置')],string='状态', default='to')
|
||||
('ing_handover', '移交中'), ('done_handover', '已移交'),
|
||||
('filing', '备案中'), ('net', '挂网'), ('signing', '签约中'),
|
||||
('signed', '已备案'), ('leased', '已出租'), ('idle', '闲置')], string='状态', default='to')
|
||||
is_meter = fields.Boolean(string="是否有水表")
|
||||
is_electricity_meter = fields.Boolean(string="是否有电表")
|
||||
company_page = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储'), ('tj','天河投建')], string="所属公司")
|
||||
company_page = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储'), ('tj', '天河投建')],
|
||||
string="所属公司")
|
||||
admin_id = fields.Many2one('res.users', string="管理员")
|
||||
purpose_id = fields.Many2one('yuthon.resource.purpose', string="资产用途")
|
||||
mgmt_type_id = fields.Many2one('yuthon.resource.management.type', string="管理类型")
|
||||
is_confirm_authorization = fields.Boolean(string="是否确权")
|
||||
owner_id = fields.Many2one('res.users', string="权属人")
|
||||
owner_id = fields.Many2one('yuthon.owner.message', string="权属人")
|
||||
property_card = fields.Html(string="产权证")
|
||||
life_timer = fields.Datetime(string="使用时间")
|
||||
property_use_time = fields.Selection([('a', '70年'), ('b', '40年')], string="使用年限")
|
||||
@@ -71,15 +73,18 @@ class YuthonProperty(models.Model):
|
||||
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='关联产权信息明细行')
|
||||
manage_information_ids = fields.One2many('manage.information.line', 'yuthon_property_id', string='关联管理信息明细行')
|
||||
disassembly_information_ids = fields.One2many('disassembly.information.line', 'yuthon_property_id', string='关联拆合信息明细行')
|
||||
manage_information_ids = fields.One2many('manage.information.line', 'yuthon_property_id',
|
||||
string='关联管理信息明细行')
|
||||
disassembly_information_ids = fields.One2many('disassembly.information.line', 'yuthon_property_id',
|
||||
string='关联拆合信息明细行')
|
||||
|
||||
@api.onchange('building_area')
|
||||
def _onchange_building_area(self):
|
||||
for rec in self:
|
||||
rec.management_area = rec.building_area
|
||||
rec.rentable_area = rec.building_area
|
||||
|
||||
#待评估物业相关信息
|
||||
# 待评估物业相关信息
|
||||
unit_price = fields.Float(string='单价')
|
||||
current_status = fields.Date(string='现状(合同到期日)')
|
||||
registered_use = fields.Char(string='证载用途')
|
||||
@@ -96,9 +101,7 @@ class YuthonProperty(models.Model):
|
||||
evaluation_whole_rent_price = fields.Float(string='评估整租单价(元/m² •月)')
|
||||
evaluation_whole_rent_total = fields.Float(string='评估总价(元•月,整租)')
|
||||
|
||||
assessment_category = fields.Char(string='评估类别')
|
||||
property_message_id = fields.Many2one('property.evaluate.application', string='关联物业评估申请')
|
||||
# yuthon_property_evaluated_id = fields.Many2one('yuthon.property.evaluated', string='关联评估备案表')
|
||||
|
||||
|
||||
def put_change_title(self):
|
||||
pass
|
||||
@@ -107,7 +110,8 @@ class YuthonProperty(models.Model):
|
||||
pass
|
||||
|
||||
def put_property_handover(self):
|
||||
property_ids = self.env["yuthon.property"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
property_ids = self.env["yuthon.property"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
form_id = self.env.ref('yuthon_property_approval.view_property_handover_form').id
|
||||
property_list = []
|
||||
for record in property_ids:
|
||||
@@ -121,9 +125,10 @@ class YuthonProperty(models.Model):
|
||||
'type': 'ir.actions.act_window',
|
||||
'views': [(form_id, 'form')],
|
||||
"context": {
|
||||
'default_property_handover_ids':property_list
|
||||
'default_property_handover_ids': property_list
|
||||
}
|
||||
}
|
||||
|
||||
def put_assessment_approval(self):
|
||||
property_ids = self.env["yuthon.property"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
@@ -135,10 +140,23 @@ class YuthonProperty(models.Model):
|
||||
if i.state != 'to':
|
||||
raise UserError("当前状态不允许提交")
|
||||
form_id = self.env.ref('yuthon_property_approval.property_evaluate_application_form').id
|
||||
property_list = []
|
||||
if not property_ids:
|
||||
property_ids = self
|
||||
for i in property_ids:
|
||||
i.write({'state': 'ing'})
|
||||
for record in property_ids:
|
||||
property_list.append([0, 0, {'name': record.name,
|
||||
'evaluation_area': record.evaluation_area,
|
||||
'registered_use':record.registered_use,
|
||||
'owner_id': record.owner_id.id,
|
||||
'purpose_id': record.purpose_id.id,
|
||||
'current_status': record.current_status,
|
||||
'last_hand_rent_price': record.unit_price,
|
||||
'rental_conditions': record.rental_conditions,
|
||||
'state':record.state,
|
||||
'remarks': record.remarks}])
|
||||
|
||||
return {
|
||||
'name': '提交物业评估',
|
||||
'view_mode': 'form',
|
||||
@@ -146,7 +164,7 @@ class YuthonProperty(models.Model):
|
||||
'type': 'ir.actions.act_window',
|
||||
'views': [(form_id, 'form')],
|
||||
"context": {
|
||||
'default_yuthon_property_ids': [(6, 0, property_ids.ids)]
|
||||
'default_evaluate_application_ids': property_list
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,6 +188,7 @@ class YuthonPropertyWater(models.Model):
|
||||
for rec in self:
|
||||
rec.property_meter_water_id.write({'yuthon_property_id': rec.property_meter_water_id.id})
|
||||
|
||||
|
||||
class YuthonPropertyEnergy(models.Model):
|
||||
_name = 'yuthon.property.energy'
|
||||
_description = '电表'
|
||||
@@ -190,7 +209,6 @@ class YuthonPropertyEnergy(models.Model):
|
||||
rec.property_meter_archives_id.write({'yuthon_property_id': rec.property_meter_archives_id.id})
|
||||
|
||||
|
||||
|
||||
class TitleInformationLine(models.Model):
|
||||
_name = 'title.information.line'
|
||||
_description = '产权信息明细行'
|
||||
@@ -201,11 +219,12 @@ class TitleInformationLine(models.Model):
|
||||
management_area = fields.Float(string="管理面积")
|
||||
building_area = fields.Float(string="建筑面积")
|
||||
rent_area = fields.Float(string="可租面积")
|
||||
owner = fields.Char(string="权属人")
|
||||
owner = fields.Many2one('yuthon.owner.message',string="权属人")
|
||||
title_certificate = fields.Char(string="产权证号")
|
||||
start_time = fields.Date(string="生效日期")
|
||||
end_date = fields.Date(string="失效日期")
|
||||
|
||||
|
||||
class ManageInformationLine(models.Model):
|
||||
_name = 'manage.information.line'
|
||||
_description = '管理信息明细行'
|
||||
@@ -219,12 +238,13 @@ class ManageInformationLine(models.Model):
|
||||
start_time = fields.Date(string="生效日期")
|
||||
end_date = fields.Date(string="失效日期")
|
||||
|
||||
|
||||
class DisassemblyInformationLine(models.Model):
|
||||
_name = 'disassembly.information.line'
|
||||
_description = '拆合信息明细行'
|
||||
|
||||
yuthon_property_id = fields.Many2one('yuthon.property', string="关联物业信息")
|
||||
property_name = fields.Char(string="物业名称") #逻辑没搞清,暂时先放这里
|
||||
property_name = fields.Char(string="物业名称") # 逻辑没搞清,暂时先放这里
|
||||
rent_area = fields.Float(string="可租面积")
|
||||
start_time = fields.Date(string="生效日期")
|
||||
end_date = fields.Date(string="失效日期")
|
||||
end_date = fields.Date(string="失效日期")
|
||||
|
||||
@@ -12,4 +12,31 @@ class YuthonPropertyEvaluated(models.Model):
|
||||
base_date = fields.Date(string="基准日")
|
||||
expert_review_time = fields.Date(string="专家评审时间")
|
||||
notice_documents_ids = fields.Many2many('ir.attachment', string='议题附件')
|
||||
# yuthon_property_evaluation_ids = fields.One2many('yuthon.', 'yuthon_property_evaluated_id', string='物业信息明细行')
|
||||
evaluate_application_ids = fields.One2many('evaluated.application.line', 'yuthon_property_evaluated_id', string='关联物业信息明细行')
|
||||
|
||||
|
||||
class EvaluatedApplicationLine(models.Model):
|
||||
_name = 'evaluated.application.line'
|
||||
_description = '物业信息明细行(已评估)'
|
||||
|
||||
yuthon_property_evaluated_id = fields.Many2one('yuthon.property.evaluated', string='关联评估备案表(已评估)')
|
||||
name = fields.Char(string='评估资产')
|
||||
owner_id = fields.Many2one('yuthon.owner.message', string="权属人")
|
||||
assessment_category = fields.Selection([('rent_money', '租金'), ('value', '价值')], string="评估类别")
|
||||
registered_use = fields.Char(string='证载用途')
|
||||
purpose_id = fields.Many2one('yuthon.resource.purpose', string="资产用途")
|
||||
rental_conditions = fields.Text(string='出租条件')
|
||||
current_status = fields.Date(string='现状(合同到期日)')
|
||||
evaluation_area = fields.Float(string='评估面积(m²)')
|
||||
remarks = fields.Text(string='备注')
|
||||
last_hand_rent_price = fields.Float(string='上一手历史租金单价(元/m²•月)')
|
||||
gov_rent_price = fields.Float(string='政府租金参考价')
|
||||
evaluation_rent_price = fields.Float(string='评估散租单价(元/m²•月)')
|
||||
evaluation_rent_total = fields.Float(string='评估总价(元•月,散租)')
|
||||
evaluation_whole_rent_price = fields.Float(string='评估整租单价(元/m² •月)')
|
||||
evaluation_whole_rent_total = fields.Float(string='评估总价(元•月,整租)')
|
||||
state = fields.Selection([('to', '待评估'), ('done', '已评估'), ('ing', '评估中'),
|
||||
('ing_handover', '移交中'), ('done_handover', '已移交'),
|
||||
('filing', '备案中'), ('net', '挂网'), ('signing', '签约中'),
|
||||
('signed', '已备案'), ('leased', '已出租'), ('idle', '闲置')], string='状态',
|
||||
default='to')
|
||||
@@ -43,3 +43,8 @@ class YuthonPropertySource(models.Model):
|
||||
|
||||
name = fields.Char(string="资产来源")
|
||||
|
||||
class YuthonOwnerMessage(models.Model):
|
||||
_name = 'yuthon.owner.message'
|
||||
_description = '权属人'
|
||||
|
||||
name = fields.Char(string="名称")
|
||||
@@ -24,4 +24,6 @@ access_property_prospective_customers,property_prospective_customers,model_prope
|
||||
access_title_information_line,title_information_line,model_title_information_line,base.group_user,1,1,1,1
|
||||
access_manage_information_line,manage_information_line,model_manage_information_line,base.group_user,1,1,1,1
|
||||
access_disassembly_information_line,disassembly_information_line,model_disassembly_information_line,base.group_user,1,1,1,1
|
||||
access_yuthon_property_source,yuthon_property_source,model_yuthon_property_source,base.group_user,1,1,1,1
|
||||
access_yuthon_property_source,yuthon_property_source,model_yuthon_property_source,base.group_user,1,1,1,1
|
||||
access_yuthon_owner_message,yuthon_owner_message,model_yuthon_owner_message,base.group_user,1,1,1,1
|
||||
access_evaluated_application_line,evaluated_application_line,model_evaluated_application_line,base.group_user,1,1,1,1
|
||||
|
@@ -280,6 +280,8 @@
|
||||
|
||||
<menuitem id="yuthon_resource_type_menu" parent="resource_mgmt_config_menu" name="资产类型"
|
||||
action="yuthon_resource_type_action" sequence="10"/>
|
||||
<menuitem id="yuthon_owner_message_menu" parent="resource_mgmt_config_menu" name="权属人配置"
|
||||
action="yuthon_owner_message_action" sequence="12"/>
|
||||
<menuitem id="yuthon_resource_house_type_menu" parent="resource_mgmt_config_menu" name="户型"
|
||||
action="yuthon_resource_house_type_action" sequence="20"/>
|
||||
<menuitem id="yuthon_resource_purpose_menu" parent="resource_mgmt_config_menu" name="用途"
|
||||
@@ -291,6 +293,7 @@
|
||||
<menuitem id="yuthon_property_source_action_menu" parent="resource_mgmt_config_menu" name="物业来源配置"
|
||||
action="yuthon_property_source_action" sequence="12"/>
|
||||
|
||||
|
||||
<menuitem
|
||||
id="property_approval_management_menu"
|
||||
parent="resource_management_menu"
|
||||
|
||||
@@ -42,30 +42,30 @@
|
||||
<group>
|
||||
<field name="notice_documents_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
<!-- <notebook>-->
|
||||
<!-- <page string="评估项目详情">-->
|
||||
<!-- <field name="yuthon_property_evaluation_ids">-->
|
||||
<!-- <tree editable="bottom">-->
|
||||
<!-- <field name="yuthon_property_evaluated_id" column_invisible="1"/>-->
|
||||
<!-- <field name="property_address" string="评估资产"/>-->
|
||||
<!-- <field name="rentable_area" string="评估面积m²"/>-->
|
||||
<!-- <field name="assessment_category" string="评估类别"/>-->
|
||||
<!-- <field name="owner"/>-->
|
||||
<!-- <field name="registered_use"/>-->
|
||||
<!-- <field name="rental_use" string="设定用途"/>-->
|
||||
<!-- <field name="current_status"/>-->
|
||||
<!-- <field name="unit_price" string="上一手历史租金单价" help="(元/m².月)"/>-->
|
||||
<!-- <field name="rental_conditions" string="出租条件"/>-->
|
||||
<!-- <field name="remarks" string="备注"/>-->
|
||||
<!-- <field name="gov_rent_price" column_invisible="1"/>-->
|
||||
<!-- <field name="evaluation_rent_price" column_invisible="1"/>-->
|
||||
<!-- <field name="evaluation_rent_total" column_invisible="1"/>-->
|
||||
<!-- <field name="evaluation_whole_rent_price" column_invisible="1"/>-->
|
||||
<!-- <field name="evaluation_whole_rent_total" column_invisible="1"/>-->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </page>-->
|
||||
<!-- </notebook>-->
|
||||
<notebook>
|
||||
<page string="评估项目详情">
|
||||
<field name="evaluate_application_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="yuthon_property_evaluated_id" column_invisible="1"/>
|
||||
<field name="name" string="评估资产"/>
|
||||
<field name="evaluation_area" string="评估面积m²"/>
|
||||
<field name="assessment_category" string="评估类别"/>
|
||||
<field name="owner_id"/>
|
||||
<field name="registered_use"/>
|
||||
<field name="purpose_id" string="设定用途"/>
|
||||
<field name="current_status"/>
|
||||
<field name="last_hand_rent_price" string="上一手历史租金单价" help="(元/m².月)"/>
|
||||
<field name="rental_conditions" string="出租条件"/>
|
||||
<field name="remarks" string="备注"/>
|
||||
<field name="gov_rent_price" column_invisible="1"/>
|
||||
<field name="evaluation_rent_price" column_invisible="1"/>
|
||||
<field name="evaluation_rent_total" column_invisible="1"/>
|
||||
<field name="evaluation_whole_rent_price" column_invisible="1"/>
|
||||
<field name="evaluation_whole_rent_total" column_invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -90,5 +90,18 @@
|
||||
<field name="res_model">yuthon.property.source</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
|
||||
<record id="view_yuthon_owner_message_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.owner.message.tree</field>
|
||||
<field name="model">yuthon.owner.message</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="yuthon_owner_message_action" model="ir.actions.act_window">
|
||||
<field name="name">物业来源</field>
|
||||
<field name="res_model">yuthon.owner.message</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -15,15 +15,54 @@ class PropertyEvaluateApplication(models.Model):
|
||||
is_experts = fields.Boolean(string="是否需要专家评审")
|
||||
notice_documents_ids = fields.Many2many('ir.attachment', string='议题附件')
|
||||
issue_library_id = fields.Many2one('issue.library', string='关联议题')
|
||||
yuthon_property_ids = fields.One2many('yuthon.property', 'property_message_id', string='物业信息明细行')
|
||||
evaluate_application_ids = fields.One2many('evaluate.application.line', 'property_message_id', string='物业信息明细行')
|
||||
|
||||
# def put(self):
|
||||
# done_ids = self.env["property.evaluate.application"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
# form_id = self.env.ref('yuthon_property_approval.view_property_handover_form').id
|
||||
# return {
|
||||
# 'name': '已评估',
|
||||
# 'type': 'ir.actions.act_window',
|
||||
# 'res_model': 'property.evaluate.application',
|
||||
# 'view_mode': 'form',
|
||||
# 'views': [(form_id, 'form')],
|
||||
def put_property_record(self):
|
||||
property_ids = self.env["property.evaluate.application"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
form_id = self.env.ref('yuthon_property_approval.view_property_record_form').id
|
||||
property_list = []
|
||||
for i in property_ids:
|
||||
for record in i.evaluate_application_ids:
|
||||
property_list.append([0, 0, {'product': record.name,
|
||||
'state': record.state,
|
||||
'property_type':record.assessment_category,
|
||||
'property_m2': record.evaluation_area,}
|
||||
])
|
||||
return {
|
||||
'name': '提交物业备案审批',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'property.record',
|
||||
'type': 'ir.actions.act_window',
|
||||
'views': [(form_id, 'form')],
|
||||
"context": {
|
||||
'default_property_record_line_ids':property_list
|
||||
}
|
||||
}
|
||||
|
||||
class EvaluateApplicationLine(models.Model):
|
||||
_name = 'evaluate.application.line'
|
||||
_description = '物业信息明细行'
|
||||
|
||||
property_message_id = fields.Many2one('property.evaluate.application', string='关联评估申请')
|
||||
yuthon_property_evaluated_id = fields.Many2one('yuthon.property.evaluated', string='关联评估备案表(已评估)')
|
||||
name = fields.Char(string='评估资产')
|
||||
owner_id = fields.Many2one('yuthon.owner.message', string="权属人")
|
||||
assessment_category = fields.Selection([('rent_money', '租金'), ('value', '价值')], string="评估类别")
|
||||
registered_use = fields.Char(string='证载用途')
|
||||
purpose_id = fields.Many2one('yuthon.resource.purpose', string="资产用途")
|
||||
rental_conditions = fields.Text(string='出租条件')
|
||||
current_status = fields.Date(string='现状(合同到期日)')
|
||||
evaluation_area = fields.Float(string='评估面积(m²)')
|
||||
remarks = fields.Text(string='备注')
|
||||
last_hand_rent_price = fields.Float(string='上一手历史租金单价(元/m²•月)')
|
||||
gov_rent_price = fields.Float(string='政府租金参考价')
|
||||
evaluation_rent_price = fields.Float(string='评估散租单价(元/m²•月)')
|
||||
evaluation_rent_total = fields.Float(string='评估总价(元•月,散租)')
|
||||
evaluation_whole_rent_price = fields.Float(string='评估整租单价(元/m² •月)')
|
||||
evaluation_whole_rent_total = fields.Float(string='评估总价(元•月,整租)')
|
||||
state = fields.Selection([('to', '待评估'), ('done', '已评估'), ('ing', '评估中'),
|
||||
('ing_handover', '移交中'), ('done_handover', '已移交'),
|
||||
('filing', '备案中'), ('net', '挂网'), ('signing', '签约中'),
|
||||
('signed', '已备案'), ('leased', '已出租'), ('idle', '闲置')], string='状态',
|
||||
default='to')
|
||||
@@ -14,19 +14,23 @@ class PropertyRecord(models.Model):
|
||||
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_record_code'))
|
||||
property_documents_ids = fields.Many2many('documents.document', string="物业备案文件")
|
||||
property_record_line_ids = fields.One2many('property.record.line', 'property_record_id', string="评估文件")
|
||||
|
||||
is_issues = fields.Boolean(string='是否上会')
|
||||
related_issues_id = fields.Many2one('issue.library', string="关联议题")
|
||||
|
||||
class PropertyRecordLine(models.Model):
|
||||
_name = 'property.record.line'
|
||||
|
||||
property_record_id = fields.Many2one('property.record', string='关联审批')
|
||||
product_id = fields.Many2one('product.product', string="物业")
|
||||
product = fields.Char(string="物业")
|
||||
product_code = fields.Char(string="评估编号")
|
||||
partner_id = fields.Many2one('res.partner', string="评估公司")
|
||||
property_statu = fields.Char(string="评估状态")
|
||||
property_type = fields.Selection([('rent_money', '租金'), ('value', '价值')], string="评估类别")
|
||||
property_m2 = fields.Float(string="评估面积")
|
||||
|
||||
state = fields.Selection([('to', '待评估'), ('done', '已评估'), ('ing', '评估中'),
|
||||
('ing_handover', '移交中'), ('done_handover', '已移交'),
|
||||
('filing', '备案中'), ('net', '挂网'), ('signing', '签约中'),
|
||||
('signed', '已备案'), ('leased', '已出租'), ('idle', '闲置')], string='状态',
|
||||
default='to')
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -42,4 +42,6 @@ access_property_approval,property_approval,model_property_approval,base.group_us
|
||||
access_property_approval_line,property_approval_line,model_property_approval_line,base.group_user,1,1,1,1
|
||||
access_property_handover,property_handover,model_property_handover,base.group_user,1,1,1,1
|
||||
access_property_handover_line,property_handover_line,model_property_handover_line,base.group_user,1,1,1,1
|
||||
access_property_inducts_wizard,property_inducts_wizard,model_property_inducts_wizard,base.group_user,1,1,1,1
|
||||
access_property_inducts_wizard,property_inducts_wizard,model_property_inducts_wizard,base.group_user,1,1,1,1
|
||||
access_evaluate_application_line,evaluate_application_line,model_evaluate_application_line,base.group_user,1,1,1,1
|
||||
access_property_record_line,property_record_line,model_property_record_line,base.group_user,1,1,1,1
|
||||
|
@@ -5,6 +5,9 @@
|
||||
<field name="model">property.evaluate.application</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="评估申请">
|
||||
<header>
|
||||
<button name="put_property_record" type="object" string="提交备案申请"/>
|
||||
</header>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="is_experts"/>
|
||||
@@ -17,11 +20,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="评估申请">
|
||||
<sheet>
|
||||
<div class="col-12 text-center">
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="code"/>
|
||||
@@ -38,19 +36,21 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="评估项目详情">
|
||||
<field name="yuthon_property_ids">
|
||||
<field name="evaluate_application_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="property_message_id" column_invisible="1"/>
|
||||
<field name="yuthon_property_evaluated_id" column_invisible="1"/>
|
||||
<field name="name" string="评估资产"/>
|
||||
<field name="rentable_area" string="评估面积m²"/>
|
||||
<field name="evaluation_area" string="评估面积m²"/>
|
||||
<field name="assessment_category" string="评估类别"/>
|
||||
<field name="owner_id"/>
|
||||
<field name="registered_use"/>
|
||||
<field name="purpose_id" string="设定用途"/>
|
||||
<field name="current_status"/>
|
||||
<field name="unit_price" string="上一手历史租金单价" help="(元/m².月)"/>
|
||||
<field name="last_hand_rent_price" string="上一手历史租金单价" help="(元/m².月)"/>
|
||||
<field name="rental_conditions" string="出租条件"/>
|
||||
<field name="remarks" string="备注"/>
|
||||
<field name="state" string="评估状态"/>
|
||||
<field name="gov_rent_price" column_invisible="1"/>
|
||||
<field name="evaluation_rent_price" column_invisible="1"/>
|
||||
<field name="evaluation_rent_total" column_invisible="1"/>
|
||||
|
||||
@@ -31,21 +31,25 @@
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="is_issues" invisible=""/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="property_data" string="物业信息">
|
||||
<field name="property_record_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="product_id"/>
|
||||
<field name="product"/>
|
||||
<field name="product_code"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="property_statu"/>
|
||||
<field name="state"/>
|
||||
<field name="property_type"/>
|
||||
<field name="property_m2"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="物业记录" invisible="not is_issues">
|
||||
<field name="related_issues_id"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<!-- <div class="o_attachment_preview"/>-->
|
||||
|
||||
Reference in New Issue
Block a user