diff --git a/attendance_iot/__manifest__.py b/attendance_iot/__manifest__.py
index 217ab66fe..d722e0621 100644
--- a/attendance_iot/__manifest__.py
+++ b/attendance_iot/__manifest__.py
@@ -26,4 +26,10 @@
'installable': True,
'application': True,
'license': 'LGPL-3',
+ 'assets': {
+ 'web.assets_backend': [
+ 'attendance_iot/static/src/js/attendance_iot_button.js',
+ 'attendance_iot/static/src/xml/attendance_iot_button.xml',
+ ],
+ },
}
diff --git a/attendance_iot/static/src/js/attendance_iot_button.js b/attendance_iot/static/src/js/attendance_iot_button.js
new file mode 100644
index 000000000..12752782f
--- /dev/null
+++ b/attendance_iot/static/src/js/attendance_iot_button.js
@@ -0,0 +1,20 @@
+/** @odoo-module */
+import { ListController } from "@web/views/list/list_controller";
+import { registry } from '@web/core/registry';
+import { listView } from '@web/views/list/list_view';
+
+export class CustomAttendanceIotController extends ListController {
+ setup() {
+ super.setup();
+ }
+
+ openBackend() {
+ window.open('http://gzsthtz.com.cn:18083/#/clients', '_blank');
+ }
+}
+
+registry.category("views").add("custom_attendance_iot_button", {
+ ...listView,
+ Controller: CustomAttendanceIotController,
+ buttonTemplate: "attendance_iot_module.ListView.Buttons",
+});
diff --git a/attendance_iot/static/src/xml/attendance_iot_button.xml b/attendance_iot/static/src/xml/attendance_iot_button.xml
new file mode 100644
index 000000000..e73aa68f8
--- /dev/null
+++ b/attendance_iot/static/src/xml/attendance_iot_button.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
diff --git a/attendance_iot/views/attendance_iot_views.xml b/attendance_iot/views/attendance_iot_views.xml
index d2c114822..c01c64c20 100644
--- a/attendance_iot/views/attendance_iot_views.xml
+++ b/attendance_iot/views/attendance_iot_views.xml
@@ -4,7 +4,7 @@
考勤机设备管理
attendance.iot
-
+
diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py
index e64f3e192..d4925c085 100644
--- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py
+++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py
@@ -1434,12 +1434,7 @@ class YuthonVacationReports(models.Model):
year = self.vacation_date.year
month = self.vacation_date.month
data = f"你{year}年{month}月的考勤确认单已经生成,请确认"
- self.sudo().env["wecom.apps"].sync_send_message_textcard(category='att_ok', user_id=we_id,
- title="考勤确认单", description=data, url=url,
- btntxt="详细信息")
- self.sudo().env["wecom.apps"].sync_send_message_textcard(category='att_ok', user_id="18562027762",
- title="考勤确认单", description=data, url=url,
- btntxt="详细信息")
+ self.sudo().env["wecom.apps"].sync_send_message_textcard(category='att_ok', user_id=we_id, title="考勤确认单", description=data, url=url, btntxt="详细信息")
self.write({'vacation_state': 'pending'})
return {
'type': 'ir.actions.client',
@@ -1478,14 +1473,7 @@ class YuthonVacationReports(models.Model):
data = f"你{year}年{month}月的考勤确认单已经生成,请确认"
# 发送给员工
- record.env["wecom.apps"].sync_send_message_textcard(
- category='att_ok',
- user_id=we_id,
- title="考勤确认单",
- description=data,
- url=url,
- btntxt="详细信息"
- )
+ record.env["wecom.apps"].sync_send_message_textcard(category='att_ok', user_id=we_id,title="考勤确认单", description=data, url=url, btntxt="详细信息")
return
@@ -1558,7 +1546,6 @@ class YuthonVacationReports(models.Model):
url = f'https://phone.thtzjt.com/phone/Notarize/{rec.id}/{rec.employee_id.user_id.id}'
data = f"你{year}年{month}月的考勤确认单已经生成,请确认"
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='att_ok', user_id=we_id, title="考勤确认单", description=data, url=url, btntxt="详细信息")
- # self.sudo().env["wecom.apps"].sync_send_message_textcard(category='att_ok', user_id="18562027762", title="考勤确认单", description=data, url=url, btntxt="详细信息")
rec.write({'vacation_state': 'pending'})
return {
'type': 'ir.actions.client',