-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[11.0][ADD] Feature: Last Week on hr_timesheet_attendance Report
- Loading branch information
1 parent
0489a5f
commit 6ca0000
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
ao_hr_timesheet_sheet/views/hr_timesheet_attendance_report_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
|
||
<record id="hr_timesheet_attendance_report_filter_last_week" model="ir.ui.view"> | ||
<field name="name">hr.timesheet.attendance.report.filter.last.week</field> | ||
<field name="model">hr.timesheet.attendance.report</field> | ||
<field name="inherit_id" ref="hr_timesheet_attendance.view_hr_timesheet_attendance_report_search"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//filter[@name='month']" position="after"> | ||
<filter name="last_week" string="Last Week" | ||
domain="[ | ||
'&', | ||
('date', '>=', (context_today() + relativedelta(weeks=-2,days=1,weekday=0)).strftime('%Y-%m-%d')), | ||
('date', '<=', (context_today() + relativedelta(weeks=-1,weekday=6)).strftime('%Y-%m-%d')), | ||
]"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</odoo> |