Commit Graph
10 Commits
Author SHA1 Message Date
Raphael Collet 975c6c8639 [REF] resource calendar (#24717)
Refactor resource calendar and resource mixin:
 - add a required timezone field on models 'resource.calendar' and 'resource.resource';
 - resource calendar attendances are now computed in the timezone of the resource
   or the calendar;
 - improve API of 'resource.calendar' and 'resource.mixin';
 - avoid other modules from using the implementation methods of 'resource.calendar';
 - refactor implementation of 'resource.calendar' to make it more efficient.
2018-05-31 20:28:12 +02:00
Thibault Delavallée ac26fa3dd4 [REF] resource: include attendance and leave info in intervals
Calendar and resource scheduling work on time intervals. However in some
cases it is useful to have info about attendances and / or leaves linked
to those intervals. Internal interval tuples is thus extended to keep
records about resource.calendar.attendance and resource.calendar.leaves.
This will notably allow to remove some hacks in stock_calendar module.
Hooray.
2017-02-27 14:04:48 +01:00
Thibault Delavallée 1c4ea80f78 [IMP] resource: clean tests code
This commit cleans resource test code by removing unnecessary stuff
and simplifying code. Purpose is to lessen number of lines and improve
readability of tests. Some duplicated tests have been removed.
2017-01-18 10:24:24 +01:00
Ravi Gohil dc77ed4f90 [MIG] resource: Migrated unittest cases to new api
- Converted yml test cases to python unittest
- now, 'self.calendar' recordset from common.py will carry forward its context
  so no need to pass context explicitely to the methods calling using that recordset.
- removed commented code
- used odoo.fields.Datetime to covert dates instead of python datetime library
2016-07-13 12:53:34 +02:00
Christophe Simonis 57168a9e90 [MERGE] forward port of branch saas-6 up to a669433 2015-09-23 14:34:26 +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
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02: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 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