@@ -5,7 +5,7 @@
|
||||
<field name="name">soong.workflow.record.search</field>
|
||||
<field name="model">soong.workflow.record</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="WorkFollow Record">
|
||||
<search string="流程查询">
|
||||
<field name="name"/>
|
||||
<field name="workflow_id" string="审批类型"/>
|
||||
<filter string="待我审批" name="to_do_approvals" domain="[('users_ids', 'in', [uid])]"/>
|
||||
@@ -17,7 +17,7 @@
|
||||
<field name="name">soong.workflow.record.tree</field>
|
||||
<field name="model">soong.workflow.record</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="WorkFollow Record" action="open_record" delete="false" type="object"
|
||||
<tree string="流程查询" action="open_record" delete="false" type="object"
|
||||
decoration-warning="approve_state == 'start'"
|
||||
decoration-muted="approve_state == 'end'" decoration-success="approve_state == 'pending'"
|
||||
create="false" default_order="write_date desc">
|
||||
@@ -82,7 +82,7 @@
|
||||
<field name="name">soong.workflow.record.tree.restore</field>
|
||||
<field name="model">soong.workflow.record</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="WorkFollow Record" action="open_record" type="object"
|
||||
<tree string="流程查询" action="open_record" type="object"
|
||||
decoration-muted="approve_state == 'end'" decoration-warning="approve_state != 'end'"
|
||||
create="false">
|
||||
<field name="name"/>
|
||||
|
||||
@@ -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='文件',
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
readonly="state in ['cancel', 'refuse', 'validate', 'validate1']"
|
||||
width="300px"
|
||||
/>
|
||||
<field name="leave_documents_ids" widget="preview_many2many" options="{'preview_type': 'button', 'preview_string': ' '}" string=" " width="100px"/>
|
||||
<field name="leave_documents_ids" widget="preview_many2many" options="{'preview_type': 'button', 'preview_string': ' '}" string=" " width="100px" readonly="1"/>
|
||||
<field name="request_unit_hours" column_invisible="True" force_save="1"/>
|
||||
<field name="request_date_from" width="300px" string="请假日期"/>
|
||||
<field name="request_hour_from" width="200px"/>
|
||||
|
||||
@@ -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)) # 可根据需要调整精度)
|
||||
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))
|
||||
@@ -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="免租期不超过")
|
||||
rent_fee_date = fields.Integer(string="免租期不超过")
|
||||
|
||||
@@ -224,13 +224,13 @@
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="view_yuthon_management_type_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.management.type.tree</field>
|
||||
<field name="model">yuthon.management.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="name">yuthon.management.type.tree</field>
|
||||
<field name="model">yuthon.management.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_management_type_action" model="ir.actions.act_window">
|
||||
<field name="name">管理类型</field>
|
||||
@@ -238,13 +238,13 @@
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="view_yuthon_bank_setting_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.bank.setting.tree</field>
|
||||
<field name="model">yuthon.bank.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="name">yuthon.bank.setting.tree</field>
|
||||
<field name="model">yuthon.bank.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_bank_setting_action" model="ir.actions.act_window">
|
||||
<field name="name">银行设置</field>
|
||||
@@ -294,10 +294,10 @@
|
||||
<tree>
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
<field name="property_id"/>
|
||||
<!-- <field name="property_ids" widget="many2many_tags"/>-->
|
||||
<field name="start_time"/>
|
||||
<field name="end_date"/>
|
||||
<button name="rent_setting" type="object" string="配置" class="oe_highlight"/>
|
||||
<!-- <button name="rent_setting" type="object" string="配置物业" class="oe_highlight"/>-->
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -309,26 +309,29 @@
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="property_id"/>
|
||||
|
||||
<field name="start_time"/>
|
||||
<field name="end_date"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="免租条件配置明细">
|
||||
<field name="rent_free_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="rent_id" column_invisible="1"/>
|
||||
<field name="minimum_area"/>
|
||||
<field name="maximum_area"/>
|
||||
<field name="rent_fee_date"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
<group string="免租条件配置明细">
|
||||
<field name="rent_free_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="rent_id" column_invisible="1"/>
|
||||
<field name="minimum_area"/>
|
||||
<field name="maximum_area"/>
|
||||
<field name="rent_fee_date"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group string="关联物业">
|
||||
<field name="property_ids">
|
||||
<field name="name"/>
|
||||
</field>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
<record id="action_rent_free_setting" model="ir.actions.act_window">
|
||||
<field name="name">免租条件配置</field>
|
||||
<field name="res_model">rent.free.setting</field>
|
||||
|
||||
@@ -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
|
||||
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)]
|
||||
}
|
||||
@@ -55,7 +55,7 @@
|
||||
<field name="evaluate_application_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="property_message_id" column_invisible="1"/>
|
||||
<field name="yuthon_property_id" column_invisible="1"/>
|
||||
<field name="property_ids" column_invisible="1"/>
|
||||
<field name="premises_id"/>
|
||||
<field name="property_floor"/>
|
||||
<field name="units"/>
|
||||
@@ -63,17 +63,13 @@
|
||||
<field name="assessment_category" string="评估类别"/>
|
||||
<field name="owner_id"/>
|
||||
<field name="registered_id"/>
|
||||
<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="registered_id2"/>
|
||||
<field name="rent_id"/>
|
||||
<field name="start_lease_period"/>
|
||||
<field name="end_lease_period"/>
|
||||
<field name="annual_increase_percentage"/>
|
||||
<field name="rent_id" string="办法"/>
|
||||
<field name="remarks" string="备注"/>
|
||||
<field name="state" string="评估状态" column_invisible="1"/>
|
||||
<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"/>
|
||||
<button name="application_detail" string="详情" type="object" class="btn-primary"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user