openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #07008
[Merge] lp:~agilebg/hr-timesheet/fix-hr_attendance_analysis-bracket into lp:hr-timesheet
Lorenzo Battistini - Agile BG has proposed merging lp:~agilebg/hr-timesheet/fix-hr_attendance_analysis-bracket into lp:hr-timesheet.
Requested reviews:
Alex Comba - Agile BG (tafaru)
HR Core Editors (hr-core-editors)
For more details, see:
https://code.launchpad.net/~agilebg/hr-timesheet/fix-hr_attendance_analysis-bracket/+merge/221278
[FIX] wrong opening bracket due to PEP8 restyle:
http://bazaar.launchpad.net/~hr-core-editors/hr-timesheet/7.0/revision/40.2.21
[ADD] button_dummy to force recomputing attendace
--
https://code.launchpad.net/~agilebg/hr-timesheet/fix-hr_attendance_analysis-bracket/+merge/221278
Your team OpenERP Community Reviewer/Maintainer is subscribed to branch lp:hr-timesheet.
=== modified file 'hr_attendance_analysis/hr_attendance.py'
--- hr_attendance_analysis/hr_attendance.py 2014-05-21 22:04:08 +0000
+++ hr_attendance_analysis/hr_attendance.py 2014-05-28 17:15:30 +0000
@@ -298,7 +298,7 @@
attendance_start.hour + attendance_start.minute / 60.0
+ attendance_start.second / 60.0 / 60.0
)
- if attendance_start_hour >= (
+ if (attendance_start_hour >=
calendar_attendance.hour_from and
(attendance_start_hour - (calendar_attendance.hour_from +
calendar_attendance.tolerance_to)) < 0.01
@@ -315,7 +315,7 @@
+ attendance_stop.second / 60.0 / 60.0
)
calendar_attendance = attendance_pool.browse(cr, uid, matched_schedule_ids[0], context=context)
- if attendance_stop_hour <= (
+ if (attendance_stop_hour <=
calendar_attendance.hour_to and
(attendance_stop_hour - (calendar_attendance.hour_to -
calendar_attendance.tolerance_from)) > -0.01
@@ -414,4 +414,8 @@
store=_store_rules),
}
-
+ def button_dummy(self, cr, uid, ids, context=None):
+ for att in self.browse(cr, uid, ids, context=context):
+ # Force recomputing stored values
+ att.write({'action': att.action})
+ return True
=== modified file 'hr_attendance_analysis/hr_attendance_view.xml'
--- hr_attendance_analysis/hr_attendance_view.xml 2013-03-05 11:28:38 +0000
+++ hr_attendance_analysis/hr_attendance_view.xml 2014-05-28 17:15:30 +0000
@@ -11,6 +11,7 @@
<field name="duration" widget="float_time"/>
<field name="outside_calendar_duration" widget="float_time"/>
<field name="inside_calendar_duration" widget="float_time" />
+ <button name="button_dummy" string="Update attendance analysis" type="object"/>
</field>
</field>
</record>