Commit Graph

11 Commits

Author SHA1 Message Date
Christophe Simonis d05ee26a72 [MERGE] forward port of branch saas-3 up to 24bcdb7 2015-09-22 15:40:28 +02:00
Christophe Simonis 024177ebc4 [FIX] resource: get_working_intervals_of_day
Use patch from 8.0 (64e1c28e35) instead of
the one from 7.0 (bbd15cdca6).
2015-09-11 18:07:49 +02:00
Goffin Simon 64e1c28e35 [FIX] resource: get_working_intervals_of_day
To compute start and end date of a working interval this function replaced
hour in datetime object without taking into account the time zone. The start and end date
taking respectively from calendar_working_day.hour_from and calendar_working_day.hour_to are
in the time zone of the user and the datetime object are compared in UTC to avoid schedule's gap.
This is why the start and end must be converted in UTC after being replaced by these hours.
The tz_info must be removed from dates because it's forbidden to compare naive and aware dates.

opw:648349
2015-09-04 10:01:20 +02:00
Antonio Espinosa e1d59f8f82 [FIX] resource: Schedule days backwards when days is negative number
Regarding _schedule_days, similar thing was done in
saas-6, @ fd5e7f2.
When the argument `days` was negative, the
returned intervals were wrong.

Regarding `get_working_intervals_of_day`,
calling this method without
`default_interval` and calendar
set crashed.

Closes #8208
2015-08-28 12:33:46 +02:00
Xavier Morel 642b3a167d [FIX] resource: py26 compat'
bzr revid: xmo@openerp.com-20140128175640-gmeecmwhevhg3oek
2014-01-28 18:56:40 +01:00
Thibault Delavallée 339c2ecc54 [IMP] default_interval also in schedule_hours, allowing to
schedule some work with a default calendar, like previous version
of resource module.

bzr revid: tde@openerp.com-20140122142805-8zyntmkx72l10fbq
2014-01-22 15:28:05 +01:00
Thibault Delavallée 9fbbba1ee0 [IMP] resource : some docstrings cleaning + void calendar
taken into account in days scheduling + finished yesys

bzr revid: tde@openerp.com-20140122132918-4c1ag6y5gqasi32d
2014-01-22 14:29:18 +01:00
Thibault Delavallée 6e1cb5226b [IMP] hr_contract: added override of base_action_rule (+ dependency) to add the possibility to use a user-related working scheduling.
bzr revid: tde@openerp.com-20130902134200-xvy5hb7lqv2wv0um
2013-09-02 15:42:00 +02:00
Thibault Delavallée 53fe285259 [IMP] resource: old API replacement + first implementation of compute_hours, to compute the number of working hours between two dates.
bzr revid: tde@openerp.com-20130830141610-uu1t88atcvpmkjjb
2013-08-30 16:16:10 +02:00
Thibault Delavallée af79a26a1f [IMP] resource: overall fix of hours/days computation + scheduling + added tests
bzr revid: tde@openerp.com-20130830133250-ixehp7imac0duygd
2013-08-30 15:32:50 +02:00
Thibault Delavallée a67459018c [IMP] resource: first refactoring of various methods to calculate timed intervals based on resource.calendar. Added tests.
bzr revid: tde@openerp.com-20130821105109-1rtynzx69hmslxey
2013-08-21 12:51:09 +02:00