Commit Graph

248 Commits

Author SHA1 Message Date
Christophe Simonis 4a3c4713e9 [MERGE] forward port of branch 7.0 up to 209ce6f 2015-03-09 11:24:32 +01:00
Denis Ledoux 3bf1615ad4 [FIX] hr_timesheet: worked hours summary when sign in without sign out
In a timesheet, when a sign in is added, and a sign out
is not following, the current time is took as sign out value.

Rev. dbb2a669f4 corrected an issue
regarding the worked hours summary not taking into account
the employee timezone.
This timezone has to be applied on the current_time also.

e.g: For an employee being in timezone UTC + 1
If the current_time is presently 12:00 (UTC+1)
If the employee set his sign in to 10:00
and do not entered a sign out
The hours summary table displayed 1:00 of worked hours,
based on computation (11:00 - 10:00)
11:00 being 12:00 but in timezone UTC

Besides, another issue was present when entering
a sign in at midnight exactly without a sign out:
If the employee set his sign in to 00:00:00
and do not set a sign out, worked hours displayed 0 worked hours
whatever the current time.

Fixes #5379
Closes #5378
Closes #5503
2015-02-27 12:04:49 +01:00
Denis Ledoux 9003537222 [MERGE] forward port of branch 7.0 up to dd9d8b0 2015-02-09 12:14:09 +01:00
Denis Ledoux dd9d8b0c84 [FIX] hr_timesheet_sheet: prevent new activity on confirmed sheets
Once a timesheet confirmed, the activity hours should not be modified,
for any reasons.

The constraint _check_sheet_state prevents to modify activities
for confirmed timesheets, but does not prevent the addition
of new activities within the current, but confirmed, timesheet.

opw-627415
fixes #5128
2015-02-09 12:13:17 +01:00
Denis Ledoux b2be001257 [MERGE] forward port of branch 7.0 up to dbb2a66 2015-01-07 12:48:39 +01:00
Denis Ledoux dbb2a669f4 [FIX] hr_timesheet_sheet: display timesheet by day summary in employee tz
If an employee in UTC + 1 (Europe/Brussels) entered an attendance from January 2 00:00 to Januay 2 23:59, the summary by day table displayed two different lines, for two different days:
 - 1 hour on January 1 from 23:00 to 23:59
 - 22:59 hours on January 2 from 00:00 to 22:59

 Which is obviously wrong, the employee, in its own time zone, worked on January 2 only.
2015-01-07 12:26:41 +01:00
Denis Ledoux 5bd0249515 [MERGE] forward port of branch 7.0 up to a218a9e 2014-09-18 16:05:34 +02:00
rmu-odoo 16a969214f [FIX] hr_timesheet_sheet: avoid error when sort attendances
When an attendance line is edited, the tuple has no key 'name' which lead to a traceback.
Fixes #546
2014-09-17 18:25:08 +02:00
Christophe Simonis 1953aa442f [MERGE] forward port of branch 7.0 up to revid 10037 mat@openerp.com-20140507133552-v4qsdp7qdp9iwewi
bzr revid: chs@openerp.com-20140507153348-g2qw61dkxvps13br
2014-05-07 17:33:48 +02:00
Yannick Vaucher c1601e75d3 [FIX] sign in and sign out were broken in rev 10019 as it doesn't provide a date to conversion of attendance time to employee timezone
lp bug: https://launchpad.net/bugs/1314589 fixed

bzr revid: yannick.vaucher@camptocamp.com-20140430113730-cn3xw66fbik8p32n
2014-04-30 13:37:30 +02:00
Olivier Dony c3e812f34a [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 10025 rev-id odo@openerp.com-20140430102552-qkwv20b20nve64th
bzr revid: odo@openerp.com-20140430110048-6971xplq8k073tto
2014-04-30 13:00:48 +02:00
Martin Trigaux c393fbcddd [MERGE] [FIX] hr_timesheet_sheet: make it timezone tolerant and avoid errors when comparing datetime and dates, courtesy of Yannick Vaucher (Camptocamp)
The attendance date recieved by the server is in UTC while the user sees it in his timezone. This means that an attendance could be in a timesheet (bounded by dates) for a user but not for the server which would not accept a valid attendance.
The fix will make the check in the user's timezone.

Only the date part of the attendance is kept for comparison as the boundaries are dates objects.

bzr revid: mat@openerp.com-20140428153216-4s6r5hu1ov0p0ofm
2014-04-29 01:32:16 +10:00
Yannick Vaucher 22d1c0956f [UPD] resolve conflicts with main branch and fix bug introduced in rev 10015 lp:1313622
lp bug: https://launchpad.net/bugs/1313622 fixed

bzr revid: yannick.vaucher@camptocamp.com-20140428142017-3warx1ai72cfetj1
2014-04-28 16:20:17 +02:00
Yannick Vaucher 886c827458 [UPD]
bzr revid: yannick.vaucher@camptocamp.com-20140428135535-o9512996d18cudgq
2014-04-28 15:55:35 +02:00
Denis Ledoux 2832d2ddc9 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 10016 revid:dle@openerp.com-20140425125507-njfyl1r6wn11vqwx
bzr revid: dle@openerp.com-20140425125926-5nchz1tcq4fx18jx
2014-04-25 14:59:26 +02:00
Martin Trigaux bb85882322 [FIX] hr_timesheet_sheet: forbid to record an attendance in a submitted timesheet (opw 592632)
bzr revid: mat@openerp.com-20140425100856-lcpgyjdk4u632bws
2014-04-25 12:08:56 +02:00
Martin Trigaux 34067a1f49 [FIX] hr_timesheet_sheet: forbid to record an attendance in a submitted timesheet
lp bug: https://launchpad.net/bugs/1180769 fixed

bzr revid: mat@openerp.com-20140424142829-ramy830hwkghk1jv
2014-04-24 16:28:29 +02:00
Christophe Simonis 52cfc16c2e [MERGE] forward port of branch 7.0 up to revid 10012 launchpad_translations_on_behalf_of_openerp-20140424063249-gwnojb5kvlq544nz
bzr revid: chs@openerp.com-20140424123538-rxk9got9k2on1ki1
2014-04-24 14:35:38 +02:00
Denis Ledoux 966a818aa6 [FIX] hr_timesheet_sheet: allow writing attendance line not according to the date order, and check that the attendances satisfy the alternance constraint, even for delete operations
lp bug: https://launchpad.net/bugs/1180773 fixed

bzr revid: dle@openerp.com-20140423112554-75bpk5k3viroqbh5
2014-04-23 13:25:54 +02:00
Denis Ledoux 546a191f0a [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9459 rev-id: fva@openerp.com-20130918153347-fy4nuvbm82ngfb8x
bzr revid: mat@openerp.com-20130826135110-f9q4p65ds2aholcw
bzr revid: dle@openerp.com-20130828141129-ecxl2vlpb8vw0o9f
bzr revid: dle@openerp.com-20130828162659-n8a0ku9o3h01qaov
bzr revid: dle@openerp.com-20130830094205-q3itwd7x0246d9n6
bzr revid: dle@openerp.com-20130830133604-mfnfbscn5wdk4vi4
bzr revid: dle@openerp.com-20130902131244-v9uh0s8rg4889i7j
bzr revid: mat@openerp.com-20130903134105-68ziuaccreu6rs61
bzr revid: chs@openerp.com-20130906171851-jtfsf4au1k30wwlr
bzr revid: dle@openerp.com-20130909103120-k5oefxgebhyslac3
bzr revid: dle@openerp.com-20130909170047-pbzw4ernvcpivbhh
bzr revid: chs@openerp.com-20130910122113-171osvcukxffxcry
bzr revid: tde@openerp.com-20130912121059-k840pi4rwdzpez8g
bzr revid: dle@openerp.com-20130913085251-p906ci2divy82jur
bzr revid: tde@openerp.com-20130913092546-kzshg1a7sls566l8
bzr revid: mat@openerp.com-20130917122102-drf8fj9lrjj0fvju
bzr revid: mat@openerp.com-20130917161614-w8u2c1ayeb5kxm30
bzr revid: dle@openerp.com-20130918161305-7ep1642nxzyy3vhd
2013-09-18 18:13:05 +02:00
Yannick Vaucher c59b97b358 [FIX] hr_timesheet_sheet - remove useless call to AT TIME ZONE in psql request here it isn't current_date but an utc 'timestamp' date. Need a strong tea even if it isn't utc tea time.
bzr revid: yannick.vaucher@camptocamp.com-20130909103819-i3143f6zenrf8hi9
2013-09-09 12:38:19 +02:00
Yannick Vaucher 76a0d0acf6 [IMP] hr_timesheet_sheet - set default timezone as UTC if employee has none
bzr revid: yannick.vaucher@camptocamp.com-20130909103749-sc1ia08hna4o6q8h
2013-09-09 12:37:49 +02:00
Yannick Vaucher 0ed7f5ef3b [IMP] hr_timesheet_sheet - simplify and improve readability in search for sheet_ids
bzr revid: yannick.vaucher@camptocamp.com-20130909103724-4w5tkx2bfms07s91
2013-09-09 12:37:24 +02:00
Yannick Vaucher 372f3d131a [IMP] hr_timesheet_sheet - remove unused variable
bzr revid: yannick.vaucher@camptocamp.com-20130909103654-wwkpyaaoqpwq1mqu
2013-09-09 12:36:54 +02:00
Yannick Vaucher e2b7cd17fc [FIX] hr_timesheet_sheet - search sheet_id for attendance using date in users timezone. As attendances depends on timezone but timesheet have from and to date instead of datetime we have to change the attendance to the same timezone expected for timesheet. And as a Timesheet belongs to a user, we can expect this timesheet to be in the same timezone as its owner. Maybe a timezone field should be added on timesheet. In anycase it make no sense to have all timesheet forced with start and end date as UTC.
lp bug: https://launchpad.net/bugs/1204224 fixed

bzr revid: yannick.vaucher@camptocamp.com-20130723184341-zowaw71f0mpghgrx
2013-07-23 20:43:41 +02:00
Amit Dodiya 70f32e1d08 [FIX] hr_timesheet_sheet: timesheet is stuck after removing an inside attendance entries so restricted deletion of inside entries if it does not follow the signin signout rule
bzr revid: ado@tinyerp.com-20130610114126-puf1gf1m1qhjvcmg
2013-06-10 17:11:26 +05:30
Amit Dodiya b2b30af120 [FIX] hr_timesheet_sheet: timesheet is stuck after removing an inside attendance entries so restricted deletion of inside entries if it does not follow the signin signout rule
bzr revid: ado@tinyerp.com-20130610092948-i7ewkauvjse4rpc3
2013-06-10 14:59:48 +05:30
Amit Dodiya 141000ffb4 [FIX] hr_timesheet_sheet: timesheet is stuck after removing an inside attendance entries so restricted deletion of inside entries if it does not follow the signin signout rule
bzr revid: ado@tinyerp.com-20130604070131-ce1dln15r6oq04zb
2013-06-04 12:31:31 +05:30
Mohammed Shekha a74fa6ed73 [FIX]Fixed the issue of timezone on total attendance on My current timesheet view.
bzr revid: msh@openerp.com-20130522125350-b6yj2mpqosfwajkc
2013-05-22 18:23:50 +05:30
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
Quentin (OpenERP) 7351a7312d [FIX] hr_timesheet: improved perfomances on the read of timesheet sheets
bzr revid: qdp-launchpad@openerp.com-20130508085938-a2uyalx1cy2musj0
2013-05-08 10:59:38 +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
Quentin (OpenERP) 2b64c79c3d [MERGE] forward port of fixes made in v7 addons branch up to revision 8872
bzr revid: qdp-launchpad@openerp.com-20130318122717-qptmntn26bx4wn8r
2013-03-18 13:27:17 +01:00
Cedric Snauwaert 7d0630b448 [FIX]hr_timesheet_sheet: fix user_id variable referenced before assignment when no employee_id
specified in onchange_employee_id

bzr revid: csn@openerp.com-20130314150614-bsnwc4gk7a9eyri0
2013-03-14 16:06:14 +01:00
Ajay Chauhan (OpenERP) 95a8d5759e [FIX] hr_timesheet_sheet: did some changes.
bzr revid: cha@tinyerp.com-20130201092307-yajxn97wnhz3xofj
2013-02-01 14:53:07 +05:30
Ajay Chauhan (OpenERP) 4b7ad7da56 [IMP] removed unused import
bzr revid: cha@tinyerp.com-20130131092950-mm2xjuv2j2t0gk7v
2013-01-31 14:59:50 +05:30
Ajay Chauhan (OpenERP) da43da8f3b [IMP] hr_timesheet_sheet: use the new signal_xxx methods instead of trg_validate.
bzr revid: cha@tinyerp.com-20130131092440-gxhz5y5rxkfuy9k3
2013-01-31 14:54:40 +05:30
Thibault Delavallée 331e420a55 [FIX] needaction: fixed last commit, harmonizing the parameters of the various needaction_domain_get.
bzr revid: tde@openerp.com-20121220110242-ot9ha7rt1ofyjoj5
2012-12-20 12:02:42 +01:00
Thibault Delavallée d737a7f098 [IMP] sale, purchase, hr_timesheet_sheet, hr_holidays, event, crm_meeting: fixed, improved and cleaned needaction_domain_get.
bzr revid: tde@openerp.com-20121220100005-d0r0se41fx83w38c
2012-12-20 11:00:05 +01:00
Cecile Tonglet 15fe515601 [MERGE] From trunk
bzr revid: cto@openerp.com-20121217144306-tkodwpox30cuvb28
2012-12-17 15:43:06 +01:00
Cedric Snauwaert ac367e4ceb [FIX]fix problem when trying to add line entry in my current timesheet
bzr revid: csn@openerp.com-20121212152126-czq2fwo1oxkvt73o
2012-12-12 16:21: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
Fabien Pinckaers e128f7f5d8 [MERGE] fixes + cleaning hr_evaluation
bzr revid: fp@tinyerp.com-20121208124319-wyrc3udl3mau2963
2012-12-08 13:43:19 +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
Tejas Tank 82c58a9f85 [FIX] corrected code for sending unwated more notes.
bzr revid: tta@openerp.com-20121206063612-g3l7aracvtyrkqnz
2012-12-06 11:36:12 +05:00
Tejas Tank 61382204dc [FIX] Does not require to set related field in default.
bzr revid: tta@openerp.com-20121203074442-cbzavdhswqyd306g
2012-12-03 12:44:42 +05:00
Tejas Tank cd4899aa6a An employee should receive a mail.message in inbox when an manager refuse a timesheet.
bzr revid: tta@openerp.com-20121122110015-61xx09vchksen6v3
2012-11-22 16:30:15 +05:30
Tejas Tank 0c07c9c827 [IMP] Corrected _needaction_domain_get.
bzr revid: tta@openerp.com-20121122063326-gsvahyei0xsnmzyg
2012-11-22 12:03:26 +05:30
Tejas Tank a8fb9f6cdd A manager of an employee should receive a mail.message in inbox when an employee validates a timesheet.
bzr revid: tta@openerp.com-20121121135444-i79rrica84rl4e4a
2012-11-21 19:24:44 +05:30
Tejas Tank 414920b52f [FIX] Corrected code style.
bzr revid: tta@openerp.com-20121121134349-fsko8x6t97d1hzdz
2012-11-21 19:13:49 +05:30