diff --git a/yuthon_hr_attendance/__manifest__.py b/yuthon_hr_attendance/__manifest__.py index 4236e0996..2701e7f91 100644 --- a/yuthon_hr_attendance/__manifest__.py +++ b/yuthon_hr_attendance/__manifest__.py @@ -65,6 +65,8 @@ 'views/meal_approval.xml', 'views/applet_address_views.xml', 'views/all_attendance_menu.xml', + 'views/overtime_approval_inherit_header.xml', + 'wizard/hr_attendance_month_wizard_views.xml', 'wizard/yuthon_delete_planning_wizard_views.xml', @@ -76,6 +78,8 @@ 'wizard/planning_slot_update_display_name_wizard.xml', 'wizard/yuthon_run_wizard.xml', 'wizard/applet_security_quick_perm_views.xml', + 'report/overtime_approval_report.xml', + 'report/overtime_approval_templates.xml', ], 'assets': { 'web.assets_backend': [ @@ -94,6 +98,8 @@ 'yuthon_hr_attendance/static/src/js/button_vacation_put.js', 'yuthon_hr_attendance/static/src/xml/button_vacation_put.xml', 'yuthon_hr_attendance/static/src/planning_gantt/planning_gantt_controller.xml', + + ], }, 'installable': True, diff --git a/yuthon_hr_attendance/models/overtime_approval.py b/yuthon_hr_attendance/models/overtime_approval.py index bf55a6161..3f7f1328c 100644 --- a/yuthon_hr_attendance/models/overtime_approval.py +++ b/yuthon_hr_attendance/models/overtime_approval.py @@ -48,6 +48,10 @@ class OvertimeApprovals(models.Model): work_end = fields.Boolean(string="结束") is_over = fields.Boolean(string="超过", compute="_compute_duration") + def action_print_overtime(self): + self.ensure_one() + return self.env.ref('yuthon_hr_attendance.action_overtime_approval_print').report_action(self) + def _get_default_name_title(self): return self._description if self._description else self._name diff --git a/yuthon_hr_attendance/report/overtime_approval_report.xml b/yuthon_hr_attendance/report/overtime_approval_report.xml new file mode 100644 index 000000000..324549d35 --- /dev/null +++ b/yuthon_hr_attendance/report/overtime_approval_report.xml @@ -0,0 +1,12 @@ + + + 加班单 + overtime.approval + qweb-pdf + yuthon_hr_attendance.overtime_approval_print_template + yuthon_hr_attendance.overtime_approval_print_template + '加班单-%s' % (object.code or object.name) + + report + + \ No newline at end of file diff --git a/yuthon_hr_attendance/report/overtime_approval_templates.xml b/yuthon_hr_attendance/report/overtime_approval_templates.xml new file mode 100644 index 000000000..25ec38e40 --- /dev/null +++ b/yuthon_hr_attendance/report/overtime_approval_templates.xml @@ -0,0 +1,78 @@ + + + \ No newline at end of file diff --git a/yuthon_hr_attendance/views/overtime_approval.xml b/yuthon_hr_attendance/views/overtime_approval.xml index 9ff95ea28..c4211f22c 100644 --- a/yuthon_hr_attendance/views/overtime_approval.xml +++ b/yuthon_hr_attendance/views/overtime_approval.xml @@ -15,6 +15,7 @@ overtime.approval
+ diff --git a/yuthon_hr_attendance/views/overtime_approval_inherit_header.xml b/yuthon_hr_attendance/views/overtime_approval_inherit_header.xml new file mode 100644 index 000000000..e806d4778 --- /dev/null +++ b/yuthon_hr_attendance/views/overtime_approval_inherit_header.xml @@ -0,0 +1,17 @@ + + + overtime.approval.form.print.inherit + overtime.approval + + + +
+
+
+
+
+
\ No newline at end of file diff --git a/yuthon_purchase/__manifest__.py b/yuthon_purchase/__manifest__.py index 9ea1901dc..3e1d32efc 100644 --- a/yuthon_purchase/__manifest__.py +++ b/yuthon_purchase/__manifest__.py @@ -11,13 +11,9 @@ 'security/ir.model.access.csv', 'security/company_rule.xml', 'data/process_code_data.xml', - 'report/purchase_workflow_report.xml', - 'report/purchase_workflow_templates.xml', 'views/inherit_product_product_views.xml', 'views/inherit_purchase_order_views.xml', 'views/purchase_workflow_views.xml', - 'report/purchase_workflow_print_report.xml', - 'report/purchase_workflow_print_templates.xml', 'report/purchase_order_print_report.xml', 'report/purchase_order_print_templates.xml', ], diff --git a/yuthon_purchase/report/purchase_workflow_print_report.xml b/yuthon_purchase/report/purchase_workflow_print_report.xml deleted file mode 100644 index c31d847ab..000000000 --- a/yuthon_purchase/report/purchase_workflow_print_report.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - 采购审批单 - purchase.workflow - qweb-pdf - yuthon_purchase.purchase_workflow_print_template - yuthon_purchase.purchase_workflow_print_template - '采购审批单-%s' % (object.code or '') - - report - - \ No newline at end of file diff --git a/yuthon_purchase/report/purchase_workflow_print_templates.xml b/yuthon_purchase/report/purchase_workflow_print_templates.xml deleted file mode 100644 index e2c257c9d..000000000 --- a/yuthon_purchase/report/purchase_workflow_print_templates.xml +++ /dev/null @@ -1,225 +0,0 @@ - - - - \ No newline at end of file diff --git a/yuthon_purchase/report/purchase_workflow_report.xml b/yuthon_purchase/report/purchase_workflow_report.xml deleted file mode 100644 index 62cfe296f..000000000 --- a/yuthon_purchase/report/purchase_workflow_report.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - 采购审批报表 - purchase.workflow - qweb-pdf - yuthon_purchase.report_purchaseworkflow - yuthon_purchase.report_purchaseworkflow - 采购审批单 - - report - - - \ No newline at end of file diff --git a/yuthon_purchase/report/purchase_workflow_templates.xml b/yuthon_purchase/report/purchase_workflow_templates.xml deleted file mode 100644 index 34a700f4f..000000000 --- a/yuthon_purchase/report/purchase_workflow_templates.xml +++ /dev/null @@ -1,357 +0,0 @@ - - - -