land ,port
This commit is contained in:
parent
55b4855d11
commit
6fa8c12645
|
|
@ -17,6 +17,23 @@
|
|||
</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>
|
||||
|
||||
|
||||
<template id="employee_attendance_report_template">
|
||||
<div class="page" style="font-size:17pt">
|
||||
<center>
|
||||
|
|
@ -490,7 +507,7 @@
|
|||
<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"/>
|
||||
<!-- <field name="context">{'totals_only': True}</field>-->
|
||||
|
||||
</record>
|
||||
|
||||
|
||||
|
|
@ -499,14 +516,13 @@
|
|||
<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="context">{'totals_only': False}</field>-->
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<record id="general_attendance_action_xls" model="ir.actions.report">
|
||||
<field name="model">employee.attendance.report</field>
|
||||
<field name="name">Print to XLSX</field>
|
||||
|
|
|
|||
|
|
@ -63,11 +63,14 @@ class AttendancesReport(models.TransientModel):
|
|||
if not self.employee_ids:
|
||||
raise ValidationError(_("Please select Employees Name"))
|
||||
|
||||
report_ref = (
|
||||
"attendances.action_totals_only_attendance_report"
|
||||
if self.print_totals_only
|
||||
else "attendances.action_general_attendance_report"
|
||||
)
|
||||
if self.print_totals_only:
|
||||
report_ref = (
|
||||
"attendances.action_totals_only_attendance_report"
|
||||
)
|
||||
else:
|
||||
report_ref = (
|
||||
"attendances.action_general_attendance_report"
|
||||
)
|
||||
|
||||
return self.env.ref(report_ref).report_action(self, data=self._payload())
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue