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 @@ - - - - - - - - - 采购审批单 - - - - - 编号: - - 供应商: - - - 未设置 - - - - - - - - 标题: - - 采购类型: - - 固定资产 - 低值易耗 - 服务 - - - - - - - - 申请人: - - - 未知 - - 付款方式: - - 一次性 - 分期 - - - - - - - - 申请日期: - - - - - - - - 合计金额: - - - - - - - - 申请事由: - - - - - - 无 - - - - - - - - - - 预计到货日期: - - - - - - - - - - 服务开始日期 - - - - - - 服务结束日期 - - - - - - 服务年限: - - - - - - 营业执照: - - - 无 - - - - - - 资质: - - - 无 - - - - - - 合同: - - - 无 - - - - - - - - - 固定资产明细 - - - - - - 物品名称 - 品牌 - 规格 - 数量 - 单位 - 单价 - 合计 - - - - - - - - - - - - - - - - - - - - - - 低值易耗明细 - - - - - - 物品名称 - 品牌 - 规格 - 数量 - 单位 - 单价 - 合计 - - - - - - - - - - - - - - - - - - - - - 服务明细 - - - - - - 服务项目 - 频次 - 费用 - 单位 - 单价 - 合计 - - - - - - - - - - - - - - - - - - - - - 付款详情 - - - - - - 付款阶段 - 比例/金额 - 付款日期 - 条件 - - - - - - - - - - - - - - - - - - - - 附件: - - - - - - - - - - - - - 审批明细 - - - - - - 节点 - 意见 - 审批人 - 操作时间 - - - - - - - - - - - - - - - - - - -