diff --git a/tianhe_approvals/models/tianhe_fee_expend_approval.py b/tianhe_approvals/models/tianhe_fee_expend_approval.py
index 93169828b..574e4e63e 100644
--- a/tianhe_approvals/models/tianhe_fee_expend_approval.py
+++ b/tianhe_approvals/models/tianhe_fee_expend_approval.py
@@ -12,6 +12,6 @@ class TianHeFeeExpend(models.Model):
joint_name = fields.Char(string="合同名称")
project_name = fields.Char(string="项目名称")
property_listings = fields.Char(string="物业列表")
- property_address = fields.Char(string="物业地址")
+ property_address = fields.Text(string="物业地址")
payment_type = fields.Char(string="支付类型")
expend_fee = fields.Integer(string="支出金额")
diff --git a/tianhe_approvals/models/wuguan_intertubular_protocol.py b/tianhe_approvals/models/wuguan_intertubular_protocol.py
index cc795841d..0d6cc162d 100644
--- a/tianhe_approvals/models/wuguan_intertubular_protocol.py
+++ b/tianhe_approvals/models/wuguan_intertubular_protocol.py
@@ -7,7 +7,7 @@ class WuguanIntertubularProtocol(models.Model):
_inherit = "approval.request"
_description = '管子间协议'
- wuguan_payout_address = fields.Char(string="物业地址")
+ wuguan_payout_address = fields.Text(string="物业地址")
management_fee = fields.Char(string="管理费")
collection_agencies = fields.Char(string="收款公司")
total_management_fee = fields.Char(string="管理费总额")
diff --git a/tianhe_approvals/models/wuguan_lease_contract_approval_form.py b/tianhe_approvals/models/wuguan_lease_contract_approval_form.py
index 2d97d6733..2030e9621 100644
--- a/tianhe_approvals/models/wuguan_lease_contract_approval_form.py
+++ b/tianhe_approvals/models/wuguan_lease_contract_approval_form.py
@@ -10,7 +10,7 @@ class WuGuanLeaseContractApprovalForm(models.Model):
first_years_rent = fields.Char(string="首年租金")
industry = fields.Char(string="行业")
wuguan_payout_address = fields.Char(string="物业地址")
- uses = fields.Char(string="出租用途")
+ uses = fields.Many2one('yuthon.rental.purpose',string="出租用途")
payment_method = fields.Char(string="缴费方式")
partner_name = fields.Char(string="联系人")
contact_number = fields.Char(string="联系电话")
diff --git a/yuthon_account/models/yuthon_reconcil.py b/yuthon_account/models/yuthon_reconcil.py
index 9494e9e14..68ab39cdd 100644
--- a/yuthon_account/models/yuthon_reconcil.py
+++ b/yuthon_account/models/yuthon_reconcil.py
@@ -17,7 +17,7 @@ class YuthonReconcil(models.Model):
payout_name = fields.Char(string="户名")
payout_note = fields.Char(string="备注")
payout_contract = fields.Char(string="合同编号")
- payout_address = fields.Char(string="物业地址")
+ payout_address = fields.Text(string="物业地址")
payout_contract_money = fields.Float(string="合同累计应收")
payout_contract_no_money = fields.Float(string="合同累计违约金")
voucher_type = fields.Char(string="凭证种类")
diff --git a/yuthon_property/__manifest__.py b/yuthon_property/__manifest__.py
index 96134119e..35b5b27c6 100644
--- a/yuthon_property/__manifest__.py
+++ b/yuthon_property/__manifest__.py
@@ -19,12 +19,12 @@
'views/property_patrol_standard.xml',
'views/yuthon_draw_result_views.xml',
'views/yuthon_expert_database_views.xml',
- 'views/property_rental_form_views.xml',
'views/property_transaction_confirmed.xml',
'views/yuthon_resource_mgmt_config_views.xml',
'views/property_meter_archives_views.xml',
'views/property_meter_water_views.xml',
- 'views/yuthon_property_evaluated_views.xml',
+ 'views/property_tenant_information_views.xml',
+ 'views/property_intention_information.xml',
'views/property_prospective_customers.xml',
'views/yuthon_property_lessee_views.xml',
'views/menuitem.xml',
diff --git a/yuthon_property/models/__init__.py b/yuthon_property/models/__init__.py
index 5ea97e7de..80bdf703a 100644
--- a/yuthon_property/models/__init__.py
+++ b/yuthon_property/models/__init__.py
@@ -8,11 +8,11 @@ from . import yuthon_resource_mgmt_config
from . import yuthon_draw_result
from . import yuthon_expert_database
from . import yuthon_property_evaluation
-from . import property_rental_form
from . import property_transaction_confirmed
from . import property_meter_archives
from . import property_meter_water
-from . import yuthon_property_evaluated
from . import property_prospective_customers
from . import yuthon_property_lessee
from . import property_assess
+from . import property_tenant_information
+from . import property_intention_information
diff --git a/yuthon_property/models/property_assess.py b/yuthon_property/models/property_assess.py
index c170e0e0e..d64805cf3 100644
--- a/yuthon_property/models/property_assess.py
+++ b/yuthon_property/models/property_assess.py
@@ -10,3 +10,6 @@ class PropertyAssess(models.Model):
class PropertyAssessLine(models.Model):
_name = 'property.assess.line'
+class PropertyType(models.Model):
+ _name = 'property.type'
+
diff --git a/yuthon_property/models/property_intention_information.py b/yuthon_property/models/property_intention_information.py
new file mode 100644
index 000000000..86fdb0941
--- /dev/null
+++ b/yuthon_property/models/property_intention_information.py
@@ -0,0 +1,11 @@
+from odoo import models, fields, api
+
+
+class PropertyIntentionInformation(models.Model):
+ _name = 'property.intention.information'
+ _description = '意向客户列表'
+
+ name = fields.Char(string='姓名')
+ sincerity_gold = fields.Float(string='诚意金')
+ card_id = fields.Many2one('documents.document', string="身份证")
+ license_id = fields.Many2one('documents.document',string='营业执照')
\ No newline at end of file
diff --git a/yuthon_property/models/property_rental_form.py b/yuthon_property/models/property_rental_form.py
deleted file mode 100644
index a2067c865..000000000
--- a/yuthon_property/models/property_rental_form.py
+++ /dev/null
@@ -1,22 +0,0 @@
-from odoo import models, fields, api
-
-
-class PropertyRentalForm(models.Model):
- _name = 'property.rental.form'
- _description = '出租申报表'
-
- name = fields.Char(string='名称')
- property_address = fields.Char(string='物业地址')
- registered_use = fields.Char(string='证载用途')
- evaluation_area = fields.Float(string='出租面积(m²)')
- current_status = fields.Date(string='租聘到期日')
- owner = fields.Char(string='原租户')
- now_rent_price = fields.Float(string='现租价(元/m² •月)')
- evaluate_rent_price = fields.Float(string='评估租(元/m² •月)')
- upset_square = fields.Float(string='底价(元/m² •月)')
- upset = fields.Float(string='底价(元/月)')
- lease_period = fields.Char(string='租凭年限')
- increment_rate = fields.Float(string='递增率')
- rental_use = fields.Char(string='出租用途')
- other = fields.Char(string='其他')
- remarks = fields.Text(string='备注')
\ No newline at end of file
diff --git a/yuthon_property/models/property_tenant_information.py b/yuthon_property/models/property_tenant_information.py
new file mode 100644
index 000000000..9258633ec
--- /dev/null
+++ b/yuthon_property/models/property_tenant_information.py
@@ -0,0 +1,18 @@
+from odoo import models, fields, api
+
+
+class PropertyTenantInformation(models.Model):
+ _name = 'property.tenant.information'
+ _description = '承租方信息'
+
+ name = fields.Char(string='姓名')
+ guarantor = fields.Char(string='担保人')
+ contact = fields.Char(string='联系人')
+ phone = fields.Char(string='联系电话')
+ email = fields.Char(string='电子邮箱')
+ address = fields.Text(string='送达地址')
+ invoicing_type = fields.Selection([('spot', '专票'), ('cape', '普票')], string="开票类型")
+ rental_purposes = fields.Many2one('yuthon.rental.purpose', string="出租用途")
+ invoicing_begins = fields.Char(string="开票抬头")
+ tax_number = fields.Char(string="税号")
+ industry = fields.Char(string="行业")
\ No newline at end of file
diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py
index a8e397f46..095447071 100644
--- a/yuthon_property/models/yuthon_property.py
+++ b/yuthon_property/models/yuthon_property.py
@@ -1,6 +1,7 @@
from odoo import models, fields, api
from odoo.exceptions import UserError, ValidationError
+
class YuthonProperty(models.Model):
_name = 'yuthon.property'
_description = '物业管理'
@@ -11,7 +12,7 @@ class YuthonProperty(models.Model):
premises = fields.Char(string="楼盘")
units = fields.Char(string="单元")
house_type_id = fields.Many2one('yuthon.resource.house.type', string="户型")
- property_room = fields.Char(string="区")
+ property_room = fields.Text(string="区")
building_area = fields.Float(string="建筑面积")
actual_area = fields.Float(string="实际面积")
management_area = fields.Float(string="管理面积")
@@ -22,6 +23,7 @@ class YuthonProperty(models.Model):
remark = fields.Char(string="备注")
vr_link = fields.Char(string="VR链接")
notice_documents_ids = fields.Many2many('ir.attachment', string='议题附件')
+ current_rent = fields.Float(string="现租金")
abbreviation = fields.Char(string="简称")
property_floor = fields.Integer(string="楼层")
@@ -32,17 +34,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="使用年限")
@@ -56,7 +59,7 @@ class YuthonProperty(models.Model):
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('property_message_code'))
rental_unit_price = fields.Float(string="评估单价")
- address = fields.Char(string="物业地址")
+ address = fields.Text(string="物业地址")
title_number = fields.Char(string="产权编号")
suite_area = fields.Float(string="套内面积")
start_time = fields.Date(string="生效时间")
@@ -71,15 +74,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,18 +102,53 @@ 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
-
- def put_change_manage(self):
- pass
+ def put_declare_approval(self):
+ 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_rental_form_form').id
+ property_list = []
+ for record in property_ids:
+ property_list.append([0, 0, {
+ 'property_id':record.id
+ }])
+ return {
+ 'name': '提交出租申报',
+ 'view_mode': 'form',
+ 'res_model': 'property.rental.form',
+ 'type': 'ir.actions.act_window',
+ 'views': [(form_id, 'form')],
+ "context": {
+ 'default_property_rental_form_line_ids': property_list,
+ }
+ }
+ def put_offline_approval(self):
+ form_id = self.env.ref('yuthon_property_approval.view_property_offline_registration_form').id
+ return {
+ 'name': '提交下线出租',
+ 'view_mode': 'form',
+ 'res_model': 'property.offline.registration',
+ 'type': 'ir.actions.act_window',
+ 'views': [(form_id, 'form')],
+ "context": {
+ 'default_property_id': self.id
+ }
+ }
+ def put_adjustment_approval(self):
+ form_id = self.env.ref('yuthon_property_approval.view_property_rental_conditions_form').id
+ return {
+ 'name': '出租价格调整申请',
+ 'view_mode': 'form',
+ 'res_model': 'property.rental.conditions',
+ 'type': 'ir.actions.act_window',
+ 'views': [(form_id, 'form')],
+ "context": {
+ 'default_property_id': self.id
+ }
+ }
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 +162,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 +177,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,11 +201,10 @@ 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
}
}
-
class YuthonPropertyWater(models.Model):
_name = 'yuthon.property.water'
_description = '水表'
@@ -170,6 +224,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 +245,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 +255,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 +274,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="失效日期")
\ No newline at end of file
+ end_date = fields.Date(string="失效日期")
diff --git a/yuthon_property/models/yuthon_property_evaluated.py b/yuthon_property/models/yuthon_property_evaluated.py
deleted file mode 100644
index 1f304a91e..000000000
--- a/yuthon_property/models/yuthon_property_evaluated.py
+++ /dev/null
@@ -1,15 +0,0 @@
-from odoo import models, fields, api
-
-
-class YuthonPropertyEvaluated(models.Model):
- _name = 'yuthon.property.evaluated'
- _description = '评估项目备案表(已评估)'
-
- name = fields.Char(string='标题')
- other_company_id = fields.Many2one('res.company', string="评估单位")
- evaluation_code = fields.Char(string="评估编号")
- evaluation_way = fields.Char(string='评估方法')
- 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='物业信息明细行')
\ No newline at end of file
diff --git a/yuthon_property/models/yuthon_resource_mgmt_config.py b/yuthon_property/models/yuthon_resource_mgmt_config.py
index 87cea83d1..8bc408625 100644
--- a/yuthon_property/models/yuthon_resource_mgmt_config.py
+++ b/yuthon_property/models/yuthon_resource_mgmt_config.py
@@ -18,7 +18,7 @@ class YuthonResourceHouseType(models.Model):
class YuthonResourcePurpose(models.Model):
_name = 'yuthon.resource.purpose'
- _description = '用途'
+ _description = '资产用途'
name = fields.Char(string="用途")
@@ -43,3 +43,15 @@ class YuthonPropertySource(models.Model):
name = fields.Char(string="资产来源")
+class YuthonOwnerMessage(models.Model):
+ _name = 'yuthon.owner.message'
+ _description = '权属人'
+
+ name = fields.Char(string="名称")
+
+
+class YuthonRentalPurposes(models.Model):
+ _name = 'yuthon.rental.purpose'
+ _description = '出租用途'
+
+ name = fields.Char(string="出租用途")
diff --git a/yuthon_property/security/ir.model.access.csv b/yuthon_property/security/ir.model.access.csv
index 70f19eff9..6a8645463 100644
--- a/yuthon_property/security/ir.model.access.csv
+++ b/yuthon_property/security/ir.model.access.csv
@@ -14,14 +14,16 @@ access_yuthon_resource_house_type,yuthon_resource_house_type,model_yuthon_resour
access_yuthon_resource_purpose,yuthon_resource_purpose,model_yuthon_resource_purpose,base.group_user,1,1,1,1
access_yuthon_resource_management_type,yuthon_resource_management_type,model_yuthon_resource_management_type,base.group_user,1,1,1,1
access_yuthon_resource_billing_type,yuthon_resource_billing_type,model_yuthon_resource_billing_type,base.group_user,1,1,1,1
-access_property_rental_form,property_rental_form,model_property_rental_form,base.group_user,1,1,1,1
access_property_transaction_confirmed,property_transaction_confirmed,model_property_transaction_confirmed,base.group_user,1,1,1,1
access_property_meter_archives,property_meter_archives,model_property_meter_archives,base.group_user,1,1,1,1
access_property_meter_water,property_meter_water,model_property_meter_water,base.group_user,1,1,1,1
-access_yuthon_property_evaluated,yuthon_property_evaluated,model_yuthon_property_evaluated,base.group_user,1,1,1,1
access_yuthon_property_lessee,yuthon_property_lessee,model_yuthon_property_lessee,base.group_user,1,1,1,1
access_property_prospective_customers,property_prospective_customers,model_property_prospective_customers,base.group_user,1,1,1,1
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
\ No newline at end of file
+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_yuthon_rental_purpose,yuthon_rental_purpose,model_yuthon_rental_purpose,base.group_user,1,1,1,1
+access_property_tenant_information,property_tenant_information,model_property_tenant_information,base.group_user,1,1,1,1
+access_property_intention_information,property_intention_information,model_property_intention_information,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 8a53c399e..6ba1ebe9b 100644
--- a/yuthon_property/views/menuitem.xml
+++ b/yuthon_property/views/menuitem.xml
@@ -22,15 +22,17 @@
name="待评估"
parent="yuthon_property_menu"
action="yuthon_on_property_action"/>
+
+ action="yuthon_property_action3"/>
+
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+