diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py
index c931762a6..1be0e4412 100644
--- a/yuthon_hr_attendance/models/hr_attendance.py
+++ b/yuthon_hr_attendance/models/hr_attendance.py
@@ -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
diff --git a/yuthon_property/__manifest__.py b/yuthon_property/__manifest__.py
index 0ba94b75f..53280b8e7 100644
--- a/yuthon_property/__manifest__.py
+++ b/yuthon_property/__manifest__.py
@@ -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',
diff --git a/yuthon_property/models/__init__.py b/yuthon_property/models/__init__.py
index 8ba4830dd..92d84e234 100644
--- a/yuthon_property/models/__init__.py
+++ b/yuthon_property/models/__init__.py
@@ -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
\ No newline at end of file
+from . import property_meter_reading
+from . import property_message_fee
\ No newline at end of file
diff --git a/yuthon_property/models/property_message_fee.py b/yuthon_property/models/property_message_fee.py
new file mode 100644
index 000000000..1c62a730b
--- /dev/null
+++ b/yuthon_property/models/property_message_fee.py
@@ -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
\ No newline at end of file
diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py
index 5948b9ec3..4b1cc456a 100644
--- a/yuthon_property/models/yuthon_property.py
+++ b/yuthon_property/models/yuthon_property.py
@@ -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="评估单价")
diff --git a/yuthon_property/security/ir.model.access.csv b/yuthon_property/security/ir.model.access.csv
index c0edb5dcc..27b97f783 100644
--- a/yuthon_property/security/ir.model.access.csv
+++ b/yuthon_property/security/ir.model.access.csv
@@ -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
\ No newline at end of file
+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
\ No newline at end of file
diff --git a/yuthon_property/views/menuitem.xml b/yuthon_property/views/menuitem.xml
index 4697e9148..802086998 100644
--- a/yuthon_property/views/menuitem.xml
+++ b/yuthon_property/views/menuitem.xml
@@ -300,6 +300,7 @@
action="yuthon_resource_mgmt_config_action"
sequence="50"/>
+
+ action="yuthon_resource_mgmt_config_action" sequence="11"/>
+