!9543 添加功能

Merge pull request !9543 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2026-03-10 10:01:19 +00:00
committed by Gitee
3 changed files with 9 additions and 1 deletions
@@ -409,6 +409,12 @@ class SoongWorkflowCommentWizard(models.TransientModel):
is_admin = self.env.user.has_group('soong_workflow.group_soong_workflow_manager')
log_done_by_ids = [log.done_by.id for log in record_id.log_ids if log.done_by]
if self.node_btn_name == '转交':
if self.res_model == 'hr.leave.batch':
if not record_id.holiday_allowance2:
record_id._compute_holiday_allowance()
record_id.write({
'holiday_allowance2': record_id.holiday_allowance,
})
has_comment_note = bool(self.comment_note_id)
has_comment = bool(self.comment and self.comment.strip())
if not has_comment_note and not has_comment:
@@ -358,6 +358,7 @@ class HolidaysRequestBatch(models.Model):
remaining_compensatory_leave = fields.Float(string="剩余补休", compute='_compute_holiday_allowance')
remaining_parental_leave = fields.Float(string="剩余育儿假", compute='_compute_holiday_allowance')
holiday_allowance = fields.Text(string="可用额度", compute='_compute_holiday_allowance')
holiday_allowance2 = fields.Text(string="可用额度") # 固定值
active = fields.Boolean('Active', default=True, tracking=True)
def _get_default_name_title(self):
+2 -1
View File
@@ -63,7 +63,8 @@
<field name="work_end" invisible="1"/>
<field name="document_ids" widget="preview_many2many"
options="{'show_select_btn': false}"/>
<field name="holiday_allowance" readonly="1"/>
<field name="holiday_allowance" readonly="1" invisible="holiday_allowance2"/>
<field name="holiday_allowance2" readonly="1" invisible="not holiday_allowance2"/>
</group>
</group>
<group col="1" groups="yuthon_salary.group_jtbb_user,yuthon_salary.group_wg_user">