commit
a66687a8fe
|
|
@ -16,22 +16,21 @@
|
|||
<field name="dpi">90</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="paperformat_euro_lowmarginn" model="report.paperformat">
|
||||
<field name="name">A4 low margin</field>
|
||||
<field name="default" eval="True"/>
|
||||
<field name="format">A4</field>
|
||||
<field name="page_height">0</field>
|
||||
<field name="page_width">0</field>
|
||||
<field name="orientation">Portrait</field>
|
||||
<field name="margin_top">5</field>
|
||||
<field name="margin_bottom">5</field>
|
||||
<field name="margin_left">5</field>
|
||||
<field name="margin_right">5</field>
|
||||
<field name="header_line" eval="False"/>
|
||||
<field name="header_spacing">0</field>
|
||||
<field name="dpi">80</field>
|
||||
</record>
|
||||
<field name="name">A4 low margin</field>
|
||||
<field name="default" eval="True"/>
|
||||
<field name="format">A4</field>
|
||||
<field name="page_height">0</field>
|
||||
<field name="page_width">0</field>
|
||||
<field name="orientation">Portrait</field>
|
||||
<field name="margin_top">5</field>
|
||||
<field name="margin_bottom">5</field>
|
||||
<field name="margin_left">5</field>
|
||||
<field name="margin_right">5</field>
|
||||
<field name="header_line" eval="False"/>
|
||||
<field name="header_spacing">0</field>
|
||||
<field name="dpi">80</field>
|
||||
</record>
|
||||
|
||||
|
||||
<template id="employee_attendance_report_template">
|
||||
|
|
@ -359,31 +358,19 @@
|
|||
</template>
|
||||
<template id="totals_only_attendance_report_template">
|
||||
<div class="page" style="font-size:12pt" dir="rtl">
|
||||
<style>
|
||||
@page {
|
||||
size: A4 landscape;
|
||||
margin: 0.5cm;
|
||||
}
|
||||
body, .page {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<center>
|
||||
<h2 style="font-weight:bold">تقرير الحضور والانصراف للموظفين</h2>
|
||||
</center>
|
||||
<br/>
|
||||
<!-- <div class="row">-->
|
||||
<!-- <div class="col-md-6">-->
|
||||
<!-- <h4 style="font-weight:bold">من تاريخ</h4>-->
|
||||
<!-- <t t-esc="date_start"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="col-md-6">-->
|
||||
<!-- <h4 style="font-weight:bold">إلى</h4>-->
|
||||
<!-- <t t-esc="date_end"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="d-flex justify-content-center" style="gap: 50px; text-align: center;">-->
|
||||
<!-- <div>-->
|
||||
<!-- <h4 style="font-weight: bold;">من تاريخ</h4>-->
|
||||
<!-- <t t-esc="date_start"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <h4 style="font-weight: bold;">إلى</h4>-->
|
||||
<!-- <t t-esc="date_end"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div style="text-align: center; font-weight: bold; font-size: 16px;">
|
||||
من تاريخ : <span style="font-weight: normal;"><t t-esc="date_start"/></span>
|
||||
|
|
@ -393,22 +380,22 @@
|
|||
<table class="table table-condensed" style="width:100%">
|
||||
<thead style="width:100%;">
|
||||
<tr style="width:100%;text-align:center; background-color: #b9d7d4 ">
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">الرقم الوظيفي</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:10%;text-align:center;">اسم الموظف</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:10%;text-align:center;">الدوام</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:10%;text-align:center;">رقم الهوية</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:10%;text-align:center;">اﻹدارة</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:10%;text-align:center;">المسمي الوظيفي</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">ايام الحضور</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">الاجازات</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">الاجازات الرسمية</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">الغياب</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">ساعات العمل الفعلية</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">ساعات العمل الاضافية</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">الاستئذان</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">مهام عمل/انتداب/تدريب</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">التأخيرات</th>
|
||||
<th tyle="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">الخروج المبكر</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">الرقم الوظيفي</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:10%;text-align:center;">اسم الموظف</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:10%;text-align:center;">الدوام</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:10%;text-align:center;">رقم الهوية</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:10%;text-align:center;">اﻹدارة</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:10%;text-align:center;">المسمي الوظيفي</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">ايام الحضور</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">الاجازات</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">الاجازات الرسمية</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">الغياب</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">ساعات العمل الفعلية</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">ساعات العمل الاضافية</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">الاستئذان</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">مهام عمل/انتداب/تدريب</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">التأخيرات</th>
|
||||
<th style="border: 1px solid gray; padding: 1px; font-size:0.8em;background-color: #b9d7d4;color: black;width:6%;text-align:center;">الخروج المبكر</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -472,10 +459,10 @@
|
|||
font-family: ae_AlMohanad;
|
||||
}
|
||||
</style>
|
||||
<!-- <t t-if="totals_only">-->
|
||||
<!-- <t t-call="attendances.totals_only_attendance_report_template"/>-->
|
||||
<!-- </t>-->
|
||||
<!-- <t t-else="">-->
|
||||
<t t-if="totals_only">
|
||||
<t t-call="attendances.totals_only_attendance_report_template"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-if="type == 'late'">
|
||||
<t t-call="attendances.late_attendance_report_template"/>
|
||||
</t>
|
||||
|
|
@ -485,42 +472,42 @@
|
|||
<t t-if="type == 'employee'">
|
||||
<t t-call="attendances.employee_attendance_report_template"/>
|
||||
</t>
|
||||
<!-- </t>-->
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="general_attendances_report_temp_land">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.external_layout">
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: 'ae_AlMohanad';
|
||||
src: local('ae_AlMohanad'), local('ae_AlMohanad'),
|
||||
url('/attendances/static/fonts/ae_AlMohanad.ttf') format('truetype');
|
||||
}
|
||||
*{
|
||||
font-family: ae_AlMohanad;
|
||||
}
|
||||
</style>
|
||||
<t t-if="totals_only">
|
||||
<t t-call="attendances.totals_only_attendance_report_template"/>
|
||||
</t>
|
||||
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
<record id="action_totals_only_attendance_reportt" model="ir.actions.report">
|
||||
<field name="model">employee.attendance.report</field>
|
||||
<field name="name">Attendance Report</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">attendances.general_attendances_report_temp_land</field>
|
||||
<field name="paperformat_id" ref="attendances.paperformat_attendance_landscapee"/>
|
||||
<!-- <template id="general_attendances_report_temp_land">-->
|
||||
<!-- <t t-call="web.html_container">-->
|
||||
<!-- <t t-call="web.external_layout">-->
|
||||
<!-- <style type="text/css">-->
|
||||
<!-- @font-face {-->
|
||||
<!-- font-family: 'ae_AlMohanad';-->
|
||||
<!-- src: local('ae_AlMohanad'), local('ae_AlMohanad'),-->
|
||||
<!-- url('/attendances/static/fonts/ae_AlMohanad.ttf') format('truetype');-->
|
||||
<!-- }-->
|
||||
<!-- *{-->
|
||||
<!-- font-family: ae_AlMohanad;-->
|
||||
<!-- }-->
|
||||
<!-- </style>-->
|
||||
<!-- <!– <t t-if="totals_only">–>-->
|
||||
<!-- <t t-call="attendances.totals_only_attendance_report_template"/>-->
|
||||
<!-- <!– </t>–>-->
|
||||
|
||||
</record>
|
||||
<!-- </t>-->
|
||||
<!-- </t>-->
|
||||
<!-- </template>-->
|
||||
|
||||
|
||||
<!-- <record id="action_totals_only_attendance_reportt" model="ir.actions.report">-->
|
||||
<!-- <field name="model">employee.attendance.report</field>-->
|
||||
<!-- <field name="name">Attendance Report</field>-->
|
||||
<!-- <field name="report_type">qweb-pdf</field>-->
|
||||
<!-- <field name="report_name">attendances.general_attendances_report_temp_land</field>-->
|
||||
<!-- <field name="paperformat_id" ref="attendances.paperformat_attendance_landscapee"/>-->
|
||||
|
||||
<!-- </record>-->
|
||||
|
||||
|
||||
<record id="action_general_attendance_reportt" model="ir.actions.report">
|
||||
|
|
@ -528,7 +515,7 @@
|
|||
<field name="name">Attendance Report</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">attendances.general_attendances_report_temp</field>
|
||||
<!-- <field name="paperformat_id" ref="attendances.paperformat_euro_lowmarginn"/>-->
|
||||
<!-- <field name="paperformat_id" ref="attendances.paperformat_euro_lowmarginn"/>-->
|
||||
|
||||
</record>
|
||||
|
||||
|
|
|
|||
|
|
@ -62,10 +62,10 @@ class AttendancesReport(models.TransientModel):
|
|||
def print_report(self):
|
||||
if not self.employee_ids:
|
||||
raise ValidationError(_("Please select Employees Name"))
|
||||
if self.print_totals_only == True:
|
||||
return self.env.ref("attendances.action_totals_only_attendance_reportt").report_action(self, data=self._payload())
|
||||
else:
|
||||
return self.env.ref("attendances.action_general_attendance_reportt").report_action(self, data=self._payload())
|
||||
# if self.print_totals_only == True:
|
||||
# return self.env.ref("attendances.action_totals_only_attendance_reportt").report_action(self, data=self._payload())
|
||||
# else:
|
||||
return self.env.ref("attendances.action_general_attendance_reportt").report_action(self, data=self._payload())
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue