land ,port
This commit is contained in:
parent
a429abd969
commit
7441e0b372
|
|
@ -472,9 +472,9 @@
|
|||
font-family: ae_AlMohanad;
|
||||
}
|
||||
</style>
|
||||
<t t-if="totals_only">
|
||||
<t t-call="attendances.totals_only_attendance_report_template"/>
|
||||
</t>
|
||||
<!-- <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"/>
|
||||
|
|
@ -491,32 +491,44 @@
|
|||
</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>
|
||||
|
||||
<!-- <record id="general_attendance_action_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</field>-->
|
||||
<!-- <field name="paperformat_id" ref="attendances.paperformat_attendance_landscapee"/>-->
|
||||
<!-- </record>-->
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
<record id="action_totals_only_attendance_report" model="ir.actions.report">
|
||||
<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</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_report" model="ir.actions.report">
|
||||
<record id="action_general_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</field>
|
||||
<field name="paperformat_id" ref="attendances.paperformat_euro_lowmarginn"/>
|
||||
<!-- <field name="paperformat_id" ref="attendances.paperformat_euro_lowmarginn"/>-->
|
||||
|
||||
</record>
|
||||
|
||||
|
|
|
|||
|
|
@ -62,12 +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_report").report_action(self, data=self._payload())
|
||||
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_report").report_action(self, data=self._payload())
|
||||
return self.env.ref("attendances.action_general_attendance_reportt").report_action(self, data=self._payload())
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue