Merge pull request !699 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2024-12-09 09:19:25 +00:00
committed by Gitee
9 changed files with 66 additions and 10 deletions
+2 -2
View File
@@ -73,12 +73,12 @@ class HrAttendance(models.Model):
[('employee_id', '=', employee_id.id), ('current_data', '=', start_date)])
if attendance_id:
if attendance_id.check_in:
check_in = record.check_in + timedelta(hours=8)
check_in = attendance_id.check_in + timedelta(hours=8)
attendance_id.is_late_card = check_in > planning_id.start_datetime
else:
attendance_id.is_no_card = True
if attendance_id.check_out:
check_in = record.check_in + timedelta(hours=8)
check_in = attendance_id.check_in + timedelta(hours=8)
attendance_id.is_early_card = planning_id.end_datetime > check_in
else:
attendance_id.is_no_card = True
+1
View File
@@ -21,6 +21,7 @@
'views/yuthon_expert_database_views.xml',
'views/property_transaction_confirmed.xml',
'views/yuthon_resource_mgmt_config_views.xml',
'views/property_message_fee_views.xml',
'views/property_meter_archives_views.xml',
'views/property_meter_water_views.xml',
'views/property_tenant_information_views.xml',
+2 -1
View File
@@ -30,4 +30,5 @@ from . import property_check_lobby
from . import property_check_project
from . import property_check_room
from . import property_check_stairs
from . import property_meter_reading
from . import property_meter_reading
from . import property_message_fee
@@ -0,0 +1,21 @@
from odoo import models, fields, api
class PropertyMessageFee(models.Model):
_name = 'property.message.fee'
_description = '物业管理费'
name = fields.Char(string='名称')
amount = fields.Float(string='金额')
start_date = fields.Date(string="生效日期")
end_date = fields.Date(string="失效日期")
is_enable = fields.Boolean(string="是否启用", compute="compute_is_enable", store=True)
@api.depends('start_date', 'end_date')
def compute_is_enable(self):
for rec in self:
if rec.start_date and rec.end_date:
if rec.start_date <= fields.Date.today() < rec.end_date:
rec.is_enable = True
else:
rec.is_enable = False
+7 -5
View File
@@ -41,25 +41,27 @@ class YuthonProperty(models.Model):
('ing_handover', '移交中'), ('done_handover', '已移交'),
('filing', '备案中'), ('net', '挂网'), ('signing', '签约中'),
('signed', '已备案'), ('leased', '已出租'), ('idle', '闲置')], string='状态', default='to')
is_meter = fields.Boolean(string="是否有水表")
is_electricity_meter = fields.Boolean(string="是否有电表")
is_meter = fields.Boolean(string="水表")
is_electricity_meter = fields.Boolean(string="电表")
yuthon_company = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储'),],
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="是否确权")
is_confirm_authorization = fields.Boolean(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="使用年限")
property_precinct = fields.Char(string="片区")
asset_type_id = fields.Many2one('yuthon.resource.type', string="资产类型")
is_hvac = fields.Boolean(string="是否使用中央空调")
is_handle_land = fields.Boolean(string="是否办理土地有偿使用手续")
is_hvac = fields.Boolean(string="使用中央空调")
is_handle_land = fields.Boolean(string="办理土地有偿使用手续")
property_use_id = fields.Integer(string="物业用途ID")
image_1920 = fields.Image(string="图片")
description = fields.Html(string="描述")
is_message_fee = fields.Boolean(string="管理费")
message_standard_id = fields.Many2one('property.message.fee', string="管理费标准")
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('property_message_code'))
rental_unit_price = fields.Float(string="评估单价")
+2 -1
View File
@@ -40,4 +40,5 @@ access_property_check_lobby,property_check_lobby,model_property_check_lobby,base
access_property_check_project,property_check_project,model_property_check_project,base.group_user,1,1,1,1
access_property_check_room,property_check_room,model_property_check_room,base.group_user,1,1,1,1
access_property_check_stairs,property_check_stairs,model_property_check_stairs,base.group_user,1,1,1,1
access_property_meter_reading,property_meter_reading,model_property_meter_reading,base.group_user,1,1,1,1
access_property_meter_reading,property_meter_reading,model_property_meter_reading,base.group_user,1,1,1,1
access_property_message_fee,property_message_fee,model_property_message_fee,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
40 access_property_check_project property_check_project model_property_check_project base.group_user 1 1 1 1
41 access_property_check_room property_check_room model_property_check_room base.group_user 1 1 1 1
42 access_property_check_stairs property_check_stairs model_property_check_stairs base.group_user 1 1 1 1
43 access_property_meter_reading property_meter_reading model_property_meter_reading base.group_user 1 1 1 1
44 access_property_message_fee property_message_fee model_property_message_fee base.group_user 1 1 1 1
+4 -1
View File
@@ -300,6 +300,7 @@
action="yuthon_resource_mgmt_config_action"
sequence="50"/>
<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="权属人配置"
@@ -313,9 +314,11 @@
<menuitem id="yuthon_resource_management_type_menu" parent="resource_mgmt_config_menu" name="管理类型"
action="yuthon_resource_management_type_action" sequence="10"/>
<menuitem id="yuthon_resource_mgmt_config_menu" parent="resource_mgmt_config_menu" name="开票类型"
action="yuthon_resource_mgmt_config_action" sequence="10"/>
action="yuthon_resource_mgmt_config_action" sequence="11"/>
<menuitem id="yuthon_property_source_action_menu" parent="resource_mgmt_config_menu" name="物业来源配置"
action="yuthon_property_source_action" sequence="12"/>
<menuitem id="yuthon_property_message_fee_action" parent="resource_mgmt_config_menu" name="物业管理费配置"
action="view_property_message_fee_action" sequence="34"/>
<menuitem
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_tree_property_message_fee" model="ir.ui.view">
<field name="name">property.message.fee.tree</field>
<field name="model">property.message.fee</field>
<field name="arch" type="xml">
<tree string="物业管理费" editable="bottom">
<field name="name"/>
<field name="amount"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="is_enable"/>
</tree>
</field>
</record>
<record id="view_property_message_fee_action" model="ir.actions.act_window">
<field name="name">物业管理费</field>
<field name="res_model">property.message.fee</field>
<field name="view_mode">tree</field>
</record>
</odoo>
@@ -64,6 +64,8 @@
<field name="is_meter"/>
<field name="is_electricity_meter"/>
<field name="is_done_merge" readonly="1"/>
<field name="is_message_fee"/>
<field name="message_standard_id" invisible="not is_message_fee"/>
</group>
</group>
<group string="属性价值" col="2">