Commit Graph

99 Commits

Author SHA1 Message Date
David Beal e773c1dce8
[FIX] resource: prevent error when deleting resource.calendar records
Attendance entries should be cascade-deleted along with the parent
record.

Closes #10310
Closes #13044
2016-10-21 19:57:23 +02:00
Adrien Peiffer (ACSONE) 5e940643a5 [FIX] In some cases, the half hours are not considered in intervals computation 2016-02-16 17:24:21 +01: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
Thibault Delavallée 622b52d262 [FIX] project_issue, resource: fixed computation of hours / days to open (assign) or close an issue. Those fields now have a conditional store, because they were not recomputed even when changing date_open and date_closed. Changing the stage now correctly changes the date_closed. Also added some fixes in resource module, the date was not correctly taken into account when computing the number of working hours between two dates. 2014-08-07 08:54:09 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary `size` parameters on char fields 2014-06-25 17:13:43 +02:00
Holger Brunn 266b553aa8 [FIX] pass correct magic value for resource
[FIX] typo

lp bug: https://launchpad.net/bugs/1297352 fixed

bzr revid: hbrunn@therp.nl-20140325151047-6sd0irzu4e85i5ru
2014-03-25 16:10:47 +01: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 2f275894f3 [CLEAN] resource: removed some TDE NOTE
bzr revid: tde@openerp.com-20140122134700-0iwb4uhg8jjdjzxn
2014-01-22 14:47:00 +01:00
Thibault Delavallée 6df94832bd [CLEAN] resource: some cleaning in docstrings
bzr revid: tde@openerp.com-20140122134609-7fvd1p49r8e40zoa
2014-01-22 14:46:09 +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 2cdefa52ef [FIX] resource: fixed computation with a False calendar id (spotted in stock_no_autopicking.py yml tests)
bzr revid: tde@openerp.com-20130830144334-ong666lutkbibtrd
2013-08-30 16:43:34 +02:00
Thibault Delavallée 83e0e842c2 [CLEAN] resource: cleaned old API
bzr revid: tde@openerp.com-20130830142736-pd1o12fe40h2vgi2
2013-08-30 16:27:36 +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
Thibault Delavallée a05b0bebbe [FORWARD] Forward port of 7.0 branch until revision 9143.
bzr revid: tde@openerp.com-20130521122359-b5vii7gv8arluz06
2013-05-21 14:23:59 +02:00
Martin Trigaux 38eb2bf80d [FIX]resource: revert correctly
bzr revid: mat@openerp.com-20130510082654-102w20am9zvgspd7
2013-05-10 10:26:54 +02:00
Martin Trigaux 726f755c2e [IMP]resource: use correctly float_compare
bzr revid: mat@openerp.com-20130510082338-055enqqpxcsuyp23
2013-05-10 10:23:38 +02:00
Martin Trigaux c820f6dcf8 [REF] revert useless chqnges
bzr revid: mat@openerp.com-20130510081803-d08uqm4b3as588xp
2013-05-10 10:18:03 +02:00
Martin Trigaux a7ee9acdaf [IMP] resource: use float_compare instead
bzr revid: mat@openerp.com-20130508142104-clgs1khxgktxlxsm
2013-05-08 16:21:04 +02:00
Martin Trigaux 22d6ef5cfe [FIX] resource: avoid floating point error in interval
bzr revid: mat@openerp.com-20130507094035-rtbyzukv4shpx024
2013-05-07 11:40:35 +02:00
Vo Minh Thu e69326ee3b [REF] removed explicit model instanciations.
bzr revid: vmt@openerp.com-20130415102349-vgcrfok2k5y10cwz
2013-04-15 12:23:49 +02:00
Chris Biersbach 90271ca3f8 [IMP] Removed debugging code
bzr revid: cbi@openerp.com-20130319103927-tpjpx5izr44xzmzp
2013-03-19 11:39:27 +01:00
Chris Biersbach 4b57becf80 [FIX] Forward Port of Changes from 6.1 Revision 7051 to make the issue analysis report work
bzr revid: cbi@openerp.com-20130319103126-07r73qlouykqazjt
2013-03-19 11:31:26 +01:00
Vo Minh Thu 6072fd11af [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20121210111654-0pm3pupnqqeip52n
2012-12-10 12:16:54 +01:00
Raphael Collet 590add54d4 [IMP] resource: improve ugly code in conversion function
bzr revid: rco@openerp.com-20121210090554-fb59bzz5ceogehms
2012-12-10 10:05:54 +01:00
Raphael Collet 635d5cbf0e [REV] undo revid:rco@openerp.com-20121207124917-cy3hz9x7aymd1cdt, because a potentially better patch is in line
bzr revid: rco@openerp.com-20121207150836-vsmee753v1w6yw6j
2012-12-07 16:08:36 +01:00
Raphael Collet 68e94d2f61 [MERGE] lp:~vrt-openerp/openobject-addons/trunk-bug-932584 (manage working times as local times)
bzr revid: rco@openerp.com-20121207124917-cy3hz9x7aymd1cdt
2012-12-07 13:49:17 +01:00
Raphael Collet aff07dfa3b [IMP] resource: improve code that computes working hours in local times
bzr revid: rco@openerp.com-20121207122351-eitc7zej6ss2035j
2012-12-07 13:23:51 +01:00
Raphael Collet 6ed367c093 [IMP] resource: small code improvements
bzr revid: rco@openerp.com-20121207121925-ju6mdv66k4zsw5yk
2012-12-07 13:19:25 +01:00
Raphael Collet ecd2cd1e05 [IMP] resource: improve conversion function hours (float) -> datetime.time
bzr revid: rco@openerp.com-20121207102718-jxojya78wnb8jmgc
2012-12-07 11:27:18 +01:00
Vo Minh Thu e7f4891d46 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121206145632-0h1coh5aaem65wsy
2012-12-06 15:56:32 +01:00
Antonin Bourguignon 1653332080 [MERGE] trunk
bzr revid: abo@openerp.com-20121002102915-424prxd74izb1szw
2012-10-02 12:29:15 +02:00
Antonin Bourguignon 1fbb4a5c16 [IMP] handling of '(copy)' l10n
bzr revid: abo@openerp.com-20120924162645-z1h4l2mj6c8i6wr3
2012-09-24 18:26:45 +02:00
Rajesh Prajapati (OpenERP) 71122ae47a [IMP]tooltip : I have changed the tooltip of fields as suggested
bzr revid: rpr@tinyerp.com-20120713101751-zokuph2bcpcmlfc5
2012-07-13 15:47:51 +05:30
Quentin (OpenERP) 0c4b5b5cf2 [IMP] project.*: usability, review of form views
bzr revid: qdp-launchpad@openerp.com-20120712144600-irb7zscuotkz4jsg
2012-07-12 16:46:00 +02:00
Bharat Devnani (OpenERP) 86ef8d586c [IMP] improved some views of project module
bzr revid: bde@tinyerp.com-20120628084903-7clyjhob6n6mm9dr
2012-06-28 14:19:03 +05:30
Mayur Maheshwari (OpenERP) 9e59ce8812 [IMP]all: Improve all typos
bzr revid: mma@tinyerp.com-20120424060532-ohrf0sxwq8rpq6ls
2012-04-24 11:35:32 +05:30
Stuart Longland 5c4dba40f7 resource: Convert working hours to UTC
Faces assumes that all times are given in the same timezone.  OpenERP
uses UTC internally, and uses UTC when communicating task and project
start/end times to faces.

It unfortunately gives the working hours in local time.  The following
converts the time zone to UTC, assuming that the working hours are in
the time zone of the currently logged-in user.  (This will have to be
fixed to convert each resources' calendar from the resource's local time
zone to UTC.)

bzr revid: me@vk4msl.yi.org-20120323052250-m03bth2dy755hw1p
2012-03-23 15:22:50 +10:00
Numerigraphe - Lionel Sausin 2d2a44dcf2 [FIX] unmutable default in the remaining modules
[REF] coding style consistency

lp bug: https://launchpad.net/bugs/525808 fixed

bzr revid: ls@numerigraphe.fr-20120305184003-er00xtj9vtcw7gna
2012-03-05 19:40:03 +01:00
Mayur Maheshwari (OpenERP) 357f3fca2f [MERGE]: Merge with lp:openobject-addons
bzr revid: mma@tinyerp.com-20111221123724-buifqfz9zvmu9s8n
2011-12-21 18:07:24 +05:30
Mayur Maheshwari (OpenERP) b439bc1606 [FIX]All: create an index for the column on require table
lp bug: https://launchpad.net/bugs/901474 fixed

bzr revid: mma@tinyerp.com-20111209060308-muefwlr323ji4kk7
2011-12-09 11:33:08 +05:30
Jigar Amin - OpenERP e726b6ee40 [IMP/FIX] YAMl typos and missing docstring for the reosurce calendar def
bzr revid: jam@tinyerp.com-20111129063028-0k7zkk1hrr1jd0vp
2011-11-29 12:00:28 +05:30
Jigar Amin - OpenERP d75cd905a7 [RM] rmoved the Unused import stmt
bzr revid: jam@tinyerp.com-20111129045736-0ev604ced41napfq
2011-11-29 10:27:36 +05:30
Jigar Amin - OpenERP f0ddecdb8f [FIX] Removed the fuction def prototype of check_availability in resource_resource
bzr revid: jam@tinyerp.com-20111129045559-31vm4mzvmvkwnak5
2011-11-29 10:25:59 +05:30
Fabien Pinckaers 8bf5afa398 merge
bzr revid: fp@tinyerp.com-20111111134612-e1wuecwk9v79qqbn
2011-11-11 14:46:12 +01:00