!8246 添加功能

Merge pull request !8246 from dev_zhou
This commit is contained in:
李鹏宇
2026-01-23 09:49:34 +00:00
committed by Gitee
3 changed files with 10 additions and 8 deletions
@@ -553,7 +553,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
is_work_remind = False
current_user = self.env.user
current_datetime = fields.Datetime.now()
is_admin = current_user.has_group('soong_workflow.group_soong_workflow_manager')
is_admin = current_user.has_group('base.group_system')
if is_admin:
record_id.log_ids[-1].sudo().write({
'comment': self.comment,
@@ -7,12 +7,14 @@ export class CustomAttendanceVacationConfirmController extends ListController {
setup() {
super.setup();
}
async openConfirm() {
await this.model.orm.call(
'vacation.over.line',
'confirm',
[]
);
async getAction(lock_type) {
const action = await this.orm.call('vacation.over.line', 'confirm', [lock_type], {context: this.props.context});
action["context"] = {
...action.context,
...this.model.root.context,
}
return action
}
}
@@ -2,7 +2,7 @@
<templates>
<t t-name="vacation_confirm_module.ListView.Buttons" t-inherit="web.ListView.Buttons">
<xpath expr="//div[hasclass('o_list_buttons')]" position="after">
<button type="button" class="btn btn-primary" style="margin-left: 10px;" t-on-click="openConfirm">
<button type="button" class="btn btn-primary" style="margin-left: 10px;" t-on-click="getAction">
确认
</button>
</xpath>