diff --git a/yuthon_holiday/models/yuthon_vacation_reports.py b/yuthon_holiday/models/yuthon_vacation_reports.py
index 7206a80ac..f0b463a4e 100644
--- a/yuthon_holiday/models/yuthon_vacation_reports.py
+++ b/yuthon_holiday/models/yuthon_vacation_reports.py
@@ -10,11 +10,14 @@ class YuthonVacationReports(models.Model):
_rec_name = "employee_id"
employee_id = fields.Many2one('hr.employee', string='员工')
+ department_id = fields.Many2one(related='employee_id.department_id', string="部门")
company_id = fields.Many2one(related="employee_id.company_id", string="公司")
leave_ids = fields.One2many('vacation.leave.line', 'vacation_id', string='年假明细')
overtime_ids = fields.One2many('vacation.over.line', 'vacation_id', string='加班明细')
meal_fee_ids = fields.One2many('vacation.meal.line', 'vacation_id', string='误餐明细')
medical_fee_ids = fields.One2many('vacation.medical.line', 'vacation_id', string='体检费明细')
+ other_fee_ids = fields.One2many('vacation.other.line', 'vacation_id', string='其他明细')
+ vacation_date = fields.Date(string='日期', default=lambda self: fields.Date.today())
leave = fields.Char(string='年假', compute='_compute_leave', store=True)
working_overtime = fields.Char(string='加班时', compute='_compute_working_overtime', store=True)
@@ -35,22 +38,6 @@ class YuthonVacationReports(models.Model):
record.medical_fee = max(total, 0.0)
- def action_open_my_form(self):
- employee = self.env.user.employee_id
- vacation_report = self.env['yuthon.vacation.reports'].search(
- [('employee_id', '=', employee.id)], limit=1)
- return {
- 'name': '我的假期额度',
- 'type': 'ir.actions.act_window',
- 'res_model': 'yuthon.vacation.reports',
- 'view_mode': 'form',
- 'res_id': vacation_report.id,
- 'view_id': self.env.ref('yuthon_holiday.view_yuthon_vacation_reports_form1').id,
- 'context': {
- 'default_employee_id': employee.id,
- },
- }
-
def overtime_allocation(self):
form_id = self.env.ref('hr_holidays.hr_leave_allocation_view_form_manager').id
holiday_status_id = self.env['hr.leave.type'].search([('name', '=', '补休')])
@@ -426,7 +413,19 @@ class VacationMedicalLine(models.Model):
return record
+class VacationOtherLine(models.Model):
+ _name = 'vacation.other.line'
+ _description = '其他'
+ vacation_id = fields.Many2one('yuthon.vacation.reports', string='关联假期额度记录')
+ holiday_type = fields.Many2one('hr.leave.type', string="假期类型")
+ employee_id = fields.Many2one('hr.employee', string='员工')
+ workflow_record_id = fields.Many2one('soong.workflow.record', string='流程')
+ update_date = fields.Date(string='更新时间')
+ update_type = fields.Selection([('add', '增加'), ('reduce', '减少')], string='更新类型')
+ is_void = fields.Boolean(string='是否作废', default=False)
+ lines = fields.Float(string='天数')
+ text = fields.Text(string='备注')
class DetailsTree(models.Model):
_name = 'details.tree'
diff --git a/yuthon_holiday/security/ir.model.access.csv b/yuthon_holiday/security/ir.model.access.csv
index 2b531e9b0..583d690e2 100644
--- a/yuthon_holiday/security/ir.model.access.csv
+++ b/yuthon_holiday/security/ir.model.access.csv
@@ -12,3 +12,4 @@ access_vacation_meal_line,vacation_meal_line,model_vacation_meal_line,base.group
access_vacation_over_line,vacation_over_line,model_vacation_over_line,base.group_user,1,1,1,1
access_details_tree, details_tree,model_details_tree,base.group_user,1,1,1,1
access_vacation_medical_line,vacation_medical_line,model_vacation_medical_line,base.group_user,1,1,1,1
+access_vacation_other_line,vacation_other_line,model_vacation_other_line,base.group_user,1,1,1,1
diff --git a/yuthon_holiday/views/yuthon_vacation_reports_views.xml b/yuthon_holiday/views/yuthon_vacation_reports_views.xml
index dbcf09ab4..a0ae22cda 100644
--- a/yuthon_holiday/views/yuthon_vacation_reports_views.xml
+++ b/yuthon_holiday/views/yuthon_vacation_reports_views.xml
@@ -15,6 +15,21 @@
+
+ yuthon.vacation.my.reports.tree
+ yuthon.vacation.reports
+
+
+
+
+
+
+
+
+
+
+
+
yuthon.vacation.reports.form
yuthon.vacation.reports
@@ -110,6 +125,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -208,6 +239,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -221,13 +267,14 @@
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_holiday.view_yuthon_vacation_reports_tree')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_holiday.view_yuthon_vacation_reports_form')})]"/>
-
+
我的假期额度表单
-
- code
-
- action = model.action_open_my_form()
-
+ yuthon.vacation.reports
+ tree,form
+ [('employee_id.user_id', '=', uid)]
+
更新报表
diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py
index 1a285b7a6..38cb7ab35 100644
--- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py
+++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py
@@ -1,6 +1,7 @@
from odoo import models, fields, api, _, SUPERUSER_ID
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
+from odoo.exceptions import UserError, ValidationError
class PropertyReconciliationWizard(models.Model):
@@ -114,12 +115,16 @@ class PropertyReconciliationWizard(models.Model):
rec.bank_id.bank_state = 'reconciled'
rec.bank_id.yes_amount = rec.amount_been_reconciled
rec.bank_id.no_amount = rec.amount_reconciled
- # 假设取第一条匹配的记录
first_line = bank_lines[0]
for line in rec.reconciliation_line_ids:
# 跳过金额为0的行
if line.amount == 0 and line.collection_type != 'penalty':
continue
+ if line.amount != line.rent:
+ if not line.remake:
+ raise UserError(_(
+ "错误:物业 '%s' 的对账明细行金额与租金不符,备注信息为必填项,请填写备注后再试。"
+ ) % line.property_id.name)
first_day = line.due_date.replace(day=1)
last_day = (first_day + relativedelta(months=1)) - relativedelta(days=1)
domain = [
diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml
index f82da962b..80c25e721 100644
--- a/yuthon_work_brand/views/hr_menus.xml
+++ b/yuthon_work_brand/views/hr_menus.xml
@@ -630,7 +630,7 @@