diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml
index be6f2ca3d..ec9813075 100644
--- a/soong_workflow/views/soong_workflow_record.xml
+++ b/soong_workflow/views/soong_workflow_record.xml
@@ -5,7 +5,7 @@
soong.workflow.record.search
soong.workflow.record
-
+
@@ -17,7 +17,7 @@
soong.workflow.record.tree
soong.workflow.record
-
@@ -82,7 +82,7 @@
soong.workflow.record.tree.restore
soong.workflow.record
-
diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py
index 573d0a19d..8b7111c9b 100644
--- a/yuthon_holiday/models/inherit_hr_leave.py
+++ b/yuthon_holiday/models/inherit_hr_leave.py
@@ -51,7 +51,7 @@ class HrLeave(models.Model):
batch_id = fields.Many2one(string='批量', comodel_name='hr.leave.batch', ondelete='cascade')
hour_batch_id = fields.Many2one(string='批量', comodel_name='hr.leave.batch', ondelete='cascade')
- leave_documents_ids = fields.Many2many(related='holiday_status_id.leave_documents_id', string="假期详情说明")
+ leave_documents_ids = fields.Many2many(related='holiday_status_id.leave_documents_id', string="假期详情说明", readonly=True)
details = fields.Text(string="假期流程说明")
custom_document_ids = fields.Many2many(
string='文件',
diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml
index 8463bcfdc..83cc5be02 100644
--- a/yuthon_holiday/views/hr_leave_batch.xml
+++ b/yuthon_holiday/views/hr_leave_batch.xml
@@ -157,7 +157,7 @@
readonly="state in ['cancel', 'refuse', 'validate', 'validate1']"
width="300px"
/>
-
+
diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py
index da7ca7604..6ca8a213a 100644
--- a/yuthon_property/models/yuthon_property.py
+++ b/yuthon_property/models/yuthon_property.py
@@ -206,8 +206,7 @@ class YuthonProperty(models.Model):
}
def put_assessment_approval(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')))
if not property_ids:
if self.state != 'to':
raise UserError("当前状态不允许提交")
@@ -221,16 +220,6 @@ class YuthonProperty(models.Model):
property_ids = self
for i in property_ids:
i.write({'state': 'ing'})
- for record in property_ids:
- owner_id = False
- if record.title_information_ids:
- first_title_info = record.title_information_ids[0].owner_id.id
- if first_title_info.owner_id:
- owner_id = first_title_info.owner_id.id
- property_list.append([0, 0, {
- 'yuthon_property_id': record.id,
- 'owner_id': owner_id
- }])
return {
'name': '提交物业评估',
@@ -401,6 +390,6 @@ class YuthonReferenceConditions(models.Model):
yuthon_property_id = fields.Many2one('yuthon.property', string="关联物业信息")
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
+ 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
diff --git a/yuthon_property/models/yuthon_resource_mgmt_config.py b/yuthon_property/models/yuthon_resource_mgmt_config.py
index e535db8f8..4c7754dcd 100644
--- a/yuthon_property/models/yuthon_resource_mgmt_config.py
+++ b/yuthon_property/models/yuthon_resource_mgmt_config.py
@@ -2,6 +2,7 @@ from pkg_resources import require
from odoo import models, fields, api
+
class YuthonResourceType(models.Model):
_name = 'yuthon.resource.type'
_description = '资产类型'
@@ -15,6 +16,7 @@ class YuthonResourceHouseType(models.Model):
name = fields.Char(string="户型")
+
class YuthonResourcePurpose(models.Model):
_name = 'yuthon.resource.purpose'
_description = '资产用途'
@@ -121,12 +123,14 @@ class YuthonPurposeEvidence(models.Model):
name = fields.Char(string="证载用途")
+
class YuthonManagementType(models.Model):
_name = 'yuthon.management.type'
_description = '管理类型'
name = fields.Char(string="管理类型")
+
class YuthonBankSetting(models.Model):
_name = 'yuthon.bank.setting'
_description = '银行'
@@ -150,6 +154,7 @@ class YuthonPropertyProduce(models.Model):
check_people = fields.Many2one('hr.employee', string="检查人")
check_date = fields.Date(string="检查日期")
+
class YuthonPremisesSetting(models.Model):
_name = 'yuthon.premises.setting'
_description = '楼盘配置'
@@ -157,20 +162,30 @@ class YuthonPremisesSetting(models.Model):
sequence = fields.Char(string='序号', store=True)
name = fields.Char(string="名称")
+
class RentFreeSetting(models.Model):
_name = 'rent.free.setting'
_description = '免租条件配置'
sequence = fields.Char(string='序号', store=True)
- property_id = fields.Many2one('yuthon.property', string='物业')
+ property_ids = fields.Many2many('yuthon.property', string='关联物业')
name = fields.Char(string="名称")
rent_type = fields.Selection([('housing', '住宅'), ('not_housing', '非住宅')], string="出租类型")
start_time = fields.Date(string="生效日期", default=fields.Date.today)
end_date = fields.Date(string="失效日期")
rent_free_line_ids = fields.One2many('rent.free.line', 'rent_id', string="免租条件配置明细")
- def rent_setting(self):
- pass
+ @api.onchange('property_ids')
+ def onchange_property_ids(self):
+ for pro in self.property_ids:
+ reference_list = []
+ if self.name not in pro.reference_ids.mapped('rent_id.name'):
+ reference_list.append([0, 0, {
+ 'yuthon_property_id': pro.id.origin,
+ 'rent_id': self.id.origin,
+ }])
+ self.env['yuthon.property'].search([('id', '=', pro.id.origin)]).sudo().write({'reference_ids': reference_list})
+
class RentFreeLine(models.Model):
_name = 'rent.free.line'
@@ -179,4 +194,4 @@ class RentFreeLine(models.Model):
rent_id = fields.Many2one('rent.free.setting', string='关联免租条件')
minimum_area = fields.Float(string="最小面积")
maximum_area = fields.Float(string="最大面积")
- rent_fee_date = fields.Integer(string="免租期不超过")
\ No newline at end of file
+ rent_fee_date = fields.Integer(string="免租期不超过")
diff --git a/yuthon_property/views/yuthon_resource_mgmt_config_views.xml b/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
index 274c247fd..b92e12fc0 100644
--- a/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
+++ b/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
@@ -224,13 +224,13 @@
tree
- yuthon.management.type.tree
- yuthon.management.type
-
-
-
-
-
+ yuthon.management.type.tree
+ yuthon.management.type
+
+
+
+
+
管理类型
@@ -238,13 +238,13 @@
tree
- yuthon.bank.setting.tree
- yuthon.bank.setting
-
-
-
-
-
+ yuthon.bank.setting.tree
+ yuthon.bank.setting
+
+
+
+
+
银行设置
@@ -294,10 +294,10 @@
-
+
-
+
@@ -309,26 +309,29 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
免租条件配置
rent.free.setting
diff --git a/yuthon_property_approval/models/property_evaluate_application.py b/yuthon_property_approval/models/property_evaluate_application.py
index 472d811c8..cf7a1be30 100644
--- a/yuthon_property_approval/models/property_evaluate_application.py
+++ b/yuthon_property_approval/models/property_evaluate_application.py
@@ -1,4 +1,4 @@
-from odoo import models, fields, api
+from odoo import models, fields, api, _
from odoo.exceptions import UserError, ValidationError
@@ -75,26 +75,38 @@ class EvaluateApplicationLine(models.Model):
_description = '物业信息明细行'
property_message_id = fields.Many2one('property.evaluate.application', string='关联评估申请')
- yuthon_property_id = fields.Many2one('yuthon.property', string='关联物业信息')
- premises_id = fields.Many2one('yuthon_property_id.premises_id', string="楼盘")
+ premises_id = fields.Many2one('yuthon.premises.setting', string="楼盘")
owner_id = fields.Many2one('yuthon.owner.message', string="权属人")
assessment_category = fields.Selection([('rent_money', '租金'), ('value', '价值')], string="评估类别")
- registered_id = fields.Many2one(related='yuthon_property_id.registered_id', string='证载用途')
- purpose_id = fields.Many2one(related='yuthon_property_id.purpose_id', string="管理类型")
- rental_conditions = fields.Text(related='yuthon_property_id.rental_conditions', string='出租条件')
- current_status = fields.Date(related='yuthon_property_id.current_status', string='现状(合同到期日)')
+ registered_id = fields.Many2one('yuthon.purpose.evidence', string='证载用途')
+ registered_id2 = fields.Many2one('yuthon.purpose.evidence', string='设定用途')
+ purpose_id = fields.Many2one('yuthon.resource.purpose', string="管理类型")
+
+ 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))
+ property_ids = fields.Many2many('yuthon.property', string="物业集合")
+
+ rental_conditions = fields.Text(string='出租条件')
+ current_status = fields.Date(string='现状(合同到期日)')
evaluation_area = fields.Float(string='评估面积(m²)')
- remarks = fields.Text(related='yuthon_property_id.remarks', string='备注')
- property_floor = fields.Integer(related='yuthon_property_id.property_floor', string="楼层")
- units = fields.Char(related='yuthon_property_id.units', string="单元")
- last_hand_rent_price = fields.Float(related='yuthon_property_id.unit_price', string='上一手历史租金单价(元/m²•月)')
+ remarks = fields.Text(string='备注')
+ property_floor = fields.Integer(string="楼层")
+ units = fields.Char(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(related='yuthon_property_id.state', string='状态', default='to')
-
def application_detail(self):
- pass
\ No newline at end of file
+ return {
+ "name": _("物业"),
+ "type": "ir.actions.act_window",
+ "view_mode": "form",
+ "res_model": "yuthon.property",
+ "views": [[self.env.ref('yuthon_property.yuthon_property_tree').id, "tree"]],
+ "domain": [('ids', 'in', self.property_ids)]
+ }
\ No newline at end of file
diff --git a/yuthon_property_approval/views/property_evaluate_application_views.xml b/yuthon_property_approval/views/property_evaluate_application_views.xml
index a9e544bd3..e77e4251d 100644
--- a/yuthon_property_approval/views/property_evaluate_application_views.xml
+++ b/yuthon_property_approval/views/property_evaluate_application_views.xml
@@ -55,7 +55,7 @@
-
+
@@ -63,17 +63,13 @@
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-