diff --git a/yuthon_hr_attendance/views/hr_attendance_month_views.xml b/yuthon_hr_attendance/views/hr_attendance_month_views.xml
index e0d1d1e16..9930fc09a 100644
--- a/yuthon_hr_attendance/views/hr_attendance_month_views.xml
+++ b/yuthon_hr_attendance/views/hr_attendance_month_views.xml
@@ -69,6 +69,7 @@
+
@@ -105,7 +106,6 @@
-
diff --git a/yuthon_property/models/property_accounts_receivable.py b/yuthon_property/models/property_accounts_receivable.py
index 9e35359e3..e7ef82699 100644
--- a/yuthon_property/models/property_accounts_receivable.py
+++ b/yuthon_property/models/property_accounts_receivable.py
@@ -8,6 +8,7 @@ class PropertyAccountsReceivable(models.Model):
_description = '应收账单'
property_id = fields.Many2one('yuthon.property', string='物业')
+ management_area = fields.Float(related='property_id.management_area', string='面积')
lessee_id = fields.Many2one('property.tenant.information', string='承租方')
admin_id = fields.Many2one(related='property_id.admin_id', string="片区管理员")
company_id = fields.Many2one(related='property_id.company_id', string="公司")
diff --git a/yuthon_property/views/property_accounts_receivable_views.xml b/yuthon_property/views/property_accounts_receivable_views.xml
index 9bd749557..9e30bbfe3 100644
--- a/yuthon_property/views/property_accounts_receivable_views.xml
+++ b/yuthon_property/views/property_accounts_receivable_views.xml
@@ -3,7 +3,7 @@
property.accounts.receivable.tree
property.accounts.receivable
-
diff --git a/yuthon_property/views/yuthon_property_views.xml b/yuthon_property/views/yuthon_property_views.xml
index abd77827b..6c627a1b1 100644
--- a/yuthon_property/views/yuthon_property_views.xml
+++ b/yuthon_property/views/yuthon_property_views.xml
@@ -280,15 +280,7 @@
-
-
-
-
-
-
-
-
diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py
index c3e1675c5..61fe2dac5 100644
--- a/yuthon_property_approval/models/inherit_yuthon_property.py
+++ b/yuthon_property_approval/models/inherit_yuthon_property.py
@@ -414,7 +414,7 @@ class PropertyDepositList(models.Model):
'contract_id': rec.contract_id.id,
'property_id': rec.property_id.id,
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
- 'original_amount': rec.aggregate,
+ 'original_amount': rec.original_amount,
'create_time': datetime.now(),
'management_type_id': management_type_id.id,
})
diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
index 117f3d342..ae2b401b7 100644
--- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml
+++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
@@ -386,13 +386,14 @@
- 应收列表
+ 应收账单
property.accounts.receivable
tree
{'group_by': 'contract_id'}
+
-
+
property.accounts.receivable.tree.form
property.accounts.receivable
@@ -410,6 +411,7 @@
合同应收报表
tree
property.accounts.receivable
+
@@ -438,6 +440,7 @@
违约金明细报表
property.accounts.receivable
tree
+
@@ -458,6 +461,7 @@
本月实收报表
property.accounts.receivable
tree
+
@@ -465,7 +469,14 @@
property.accounts.receivable
-
+
+
+
+
+
+
+
+
@@ -473,6 +484,7 @@
累计欠收报表
property.accounts.receivable
tree
+
批量生成违约金
diff --git a/yuthon_property_approval/wizard/property_rental_wizard.py b/yuthon_property_approval/wizard/property_rental_wizard.py
index 7cdbd64bf..f5c70e9cb 100644
--- a/yuthon_property_approval/wizard/property_rental_wizard.py
+++ b/yuthon_property_approval/wizard/property_rental_wizard.py
@@ -2,6 +2,8 @@ from odoo import models, fields, api, _, SUPERUSER_ID
from odoo.exceptions import UserError, ValidationError
from dateutil.relativedelta import relativedelta
from datetime import datetime, time, timedelta
+import calendar
+
class PropertyRentalWizard(models.Model):
_name = 'property.rental.wizard'
@@ -158,12 +160,17 @@ class PropertyRentalWizard(models.Model):
def confirm(self):
"""主逻辑入口"""
- records = self.env['property.lease.contract'].search(
- [('cycle_dict', 'in', ['monthly', 'quarter', 'half', 'year'])])
year, month = int(self.select_year), int(self.select_month)
date_field = datetime(year, month, 1).date()
date_field_year_month = date_field.strftime('%Y-%m')
-
+ # 获取当月第一天和最后一天
+ first_day = datetime.strptime(date_field_year_month, '%Y-%m').date() # 当月第一天
+ last_day = (first_day + relativedelta(months=1, days=-1)) # 当月最后一天
+ records = self.env['property.lease.contract'].search([
+ ('cycle_dict', 'in', ['monthly', 'quarter', 'half', 'year']),
+ ('actual_start_time', '<=', last_day),
+ ('actual_end_time', '>=', first_day)
+ ])
for record in records:
date_data = {
'five': 5,
diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml
index cfd8cc07c..2df5d6d10 100644
--- a/yuthon_salary/views/inherit_hr_payslip_views.xml
+++ b/yuthon_salary/views/inherit_hr_payslip_views.xml
@@ -364,6 +364,8 @@
hr.payslip
+
+
@@ -374,8 +376,6 @@
-
-