!10988 添加功能

Merge pull request !10988 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2026-04-20 02:24:44 +00:00
committed by Gitee
2 changed files with 10 additions and 13 deletions
@@ -1437,10 +1437,7 @@ class SoongWorkflowMixin(models.AbstractModel):
id_el = etree.Element("field")
id_el.set("name", "log_ids")
id_el.set("invisible", "1")
if self._name == "purchase.order":
# 采购订单模型:不添加 is_modify 条件
field_inst.set("readonly", "state in %s" % readonly_arr)
else:
if readonly_arr:
field_inst.set("readonly", "(state in %s) and (is_modify != True)" % readonly_arr)
# if required_arr:
# field_inst.set("required", "state in %s" % required_arr)
@@ -2040,7 +2040,7 @@ class YuthonVacationReports(models.Model):
],
limit=1 # 避免多条记录,只取第一条
)
vacation_sum1 = report_id.dynamic_previous_year1 * 8 + report_id.this_year1 * 8 if report_id else 0.0
vacation_sum = report_id.dynamic_previous_year1 * 8 + report_id.this_year1 * 8 if report_id else 0.0
active_id = self.env['vacation.overtime.active'].search(
[('employee_id', '=', emp_id),
('select_month', '=', str(last_month_first.month)),
@@ -2048,11 +2048,11 @@ class YuthonVacationReports(models.Model):
('select_revoke', '!=', 'done'),
])
if active_id:
vacation_sum1 -= active_id.carry_forward_quantity
vacation_sum -= active_id.carry_forward_quantity
employee_summary[emp_id] = {
'employee_id': emp_id,
'valid_date': line.valid_date,
'vacation_sum1': vacation_sum1,
'vacation_sum': vacation_sum,
'last_balance': report_id.dynamic_previous_year1 * 8 if report_id else 0.0,
'remainder_year': 0.0,
'carry_forward_quantity': 0.0,
@@ -2118,7 +2118,7 @@ class YuthonVacationReports(models.Model):
],
limit=1 # 避免多条记录,只取第一条
)
vacation_sum1 = report_id.dynamic_previous_year1 * 8 + report_id.this_year1 * 8 if report_id else 0.0
vacation_sum = report_id.dynamic_previous_year1 * 8 + report_id.this_year1 * 8 if report_id else 0.0
active_id = self.env['vacation.overtime.active'].search(
[('employee_id', '=', emp_id),
('select_month', '=', str(last_month_first.month)),
@@ -2126,11 +2126,11 @@ class YuthonVacationReports(models.Model):
('select_revoke', '!=', 'done'),
])
if active_id:
vacation_sum1 -= active_id.carry_forward_quantity
vacation_sum -= active_id.carry_forward_quantity
employee_summary[emp_id] = {
'employee_id': emp_id,
'valid_date': line.valid_date,
'vacation_sum1': vacation_sum1,
'vacation_sum': vacation_sum,
'last_balance': report_id.dynamic_previous_year1 * 8 if report_id else 0.0,
'remainder_year': 0.0,
'carry_forward_quantity': 0.0,
@@ -2200,7 +2200,7 @@ class YuthonVacationReports(models.Model):
],
limit=1 # 避免多条记录,只取第一条
)
vacation_sum1 = report_id.dynamic_previous_year1 * 8 + report_id.this_year1 * 8 if report_id else 0.0
vacation_sum = report_id.dynamic_previous_year1 * 8 + report_id.this_year1 * 8 if report_id else 0.0
active_id = self.env['vacation.overtime.active'].search(
[('employee_id', '=', emp_id),
('select_month', '=', str(last_month_first.month)),
@@ -2208,11 +2208,11 @@ class YuthonVacationReports(models.Model):
('select_revoke', '!=', 'done'),
])
if active_id:
vacation_sum1 -= active_id.carry_forward_quantity
vacation_sum -= active_id.carry_forward_quantity
employee_summary[emp_id] = {
'employee_id': emp_id,
'valid_date': line.valid_date,
'vacation_sum1':vacation_sum1,
'vacation_sum':vacation_sum,
'last_balance': report_id.dynamic_previous_year1 * 8 if report_id else 0.0,
'remainder_year': 0.0,
'carry_forward_quantity': 0.0,