Commit Graph

340 Commits

Author SHA1 Message Date
Nicolas Martinelli 0854320ec1 [FIX] hr_holidays: leaves_count on stat button only counts type 'remove'
The stat button 'Leaves' on the employee's form view displays the total number
of leaves (including holidays allocations and leave requests). When the button
is clicked, only leave requests are show, which makes inconsistent the number
displayed with the list of results. This fixes this behavior.

opw-640349
2015-05-27 11:23:49 +02:00
Raphael Collet 4fb9c8f0dc [FIX] hr_holidays: fix validation of the number of days
The validation of leaves was broken because it relies on a check on the
remaining days.  The problem is that the latter uses an old-api function field
that is not recomputed yet at the time of the validation.  The fix consists in
using a non-computed field instead.
2015-01-08 14:36:24 +01:00
Yannick Vaucher ead3f039df [FIX] hr_holidays: Add missing context check
Fixes #4341
2014-12-19 16:27:51 +01:00
Jeremy Kersten 24bec094c2 [IMP] hr_holiday/calendar : allow to pass no_email into context when we create a meeting to avoid to send a mail to attendees. 2014-10-03 20:43:48 +02:00
Thibault Delavallée 7cad4baa84 [FIX] [CLEAN] Various: fixed / cleaned use of dict.fromkeys.
Indeed using fromkeys with a list / dict as argument leads to the creation
of shared list / dict. This could create some ugly side effects when
used in loops. This commit fixes or cleans this kind of statement to avoid
unwanted side effects.
2014-09-18 11:18:30 +02:00
Christophe Simonis 8046b7367d [MERGE] forward port of branch saas-5 up to 7e117b1 2014-08-28 16:51:11 +02:00
Christophe Simonis 7e117b18a0 [MERGE] forward port of branch saas-3 up to ada9724 2014-08-28 16:21:27 +02:00
Christophe Simonis ada9724655 [MERGE] forward port of branch 7.0 up to 3509e15 2014-08-28 16:12:55 +02:00
Denis Ledoux 9b3f3fecfe [FIX] hr_holidays: employees cannot approve their holidays
Nor modify once approved

It wasn't possible for employees to approve their holidays themself, thanks to the GUI, but this was possible through xmlrpc calls, or when altering the html directly in the browser.
Besides, this was also possible to edit the holiday through the same trick once the holiday validated
2014-08-25 14:51:03 +02:00
Christophe Simonis fd4fd35e32 [MERGE] forward port of branch saas-5 up to e4cb520 2014-07-30 20:52:14 +02:00
Christophe Simonis e4cb5202a0 [MERGE] forward port of branch saas-4 up to fa07bc8 2014-07-30 20:30:14 +02:00
Denis Ledoux 88c022dfc8 [MERGE] forward port of branch 7.0 up to bbb8d8f25a 2014-07-29 11:42:10 +02:00
Denis Ledoux 6b1a804b29 [MERGE] forward port of branch 7.0 up to b91a75f7ef
Conflicts:
	addons/base_vat/base_vat.py
	openerp/tools/safe_eval.py
2014-07-29 10:42:50 +02:00
Denis Ledoux ced5852144 [FIX] hr_holidays: do not allow reduce remaining leaves
In the Employee form, a remaining legal leaves field is available, which shows remaining validated leaves from allocation requests
As this is not allowed to delete a validated allocation requets, it shouldn't be possible to reduce the validated remaining leaves of an employee.
To reduce the remaining leaves of an employee, the user should cancel and remove the allocation request
2014-07-25 14:45:48 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +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
Olivier Dony d9cda97cf4 [MERGE] Forward-port saas-4 up to 5ceded9 2014-07-05 01:28:19 +02:00
Olivier Dony f3880a8a09 [MERGE] Forward-port of 7.0 up to 64ac1b0 2014-07-04 17:07:53 +02:00
Olivier Dony 1279ca0334 [FIX] hr_holidays: proper parameter passing syntax for raw SQL
This instance was not actually exploitable for
SQL injection as it is not callable directly
via RPC and guarded by other queries when indirectly
called. Still plain awful.
2014-07-04 16:45:41 +02:00
Christophe Simonis adf07a9490 [MERGE] forward port of branch saas-4 up to 5087612 2014-06-19 16:13:35 +02:00
Denis Ledoux 3c0292645f [MERGE] Forward-port of 7.0 bugfixes up to 63ea0df73f 2014-06-16 17:37:10 +02:00
Thibault Delavallée 4e0559ef97 [FIX] hr_holidays: display float for leaves remaining / leaves taken in holiday type name get 2014-06-13 08:52:25 +02:00
Christophe Simonis a756b82372 [MERGE] forward port of branch saas-4 up to revid bb26dea 2014-05-20 20:19:55 +02:00
Martin Trigaux 8ea4f581ed Forward-port of latest 7.0, up to rev. 10046 (rev-id: launchpad_translations_on_behalf_of_openerp-20140514062049-vjclnuxlkbto0tsj) 2014-05-14 10:04:16 +02:00
Martin Trigaux c636fb9dd9 [FIX] hr_holidays: better display of leave counter (opw 605016)
The number of leave requests left is based on the employee_id key in the context, when displaying the status of an hr.holidays we don't have the information in the name_get of the hr.holidays.status.
The fallback on the number of employees is done with the uid but we can not rely on it as well as the name_get on m2o field is done with superuser_id.

bzr revid: mat@openerp.com-20140508124946-ttyr84iajg9q6l0y
2014-05-08 14:49:46 +02:00
Gery Debongnie cc041c516a [FIX] code cleanup (addon hr_holidays)
improves th _leaves_count method, and remove an useless one2many field
(leaves_ids)

bzr revid: ged@openerp.com-20140507083556-rqm5sllj8fc3qfev
2014-05-07 10:35:56 +02:00
Kersten Jeremy 868f54780e [MERGE] Merge with trunk-cal-V8-jke. - Change field datetime into date or datetime according to that event type is in all day or not...
bzr revid: jke@openerp.com-20140505162422-k332rm7j21af5ore
2014-05-05 18:24:22 +02:00
Kersten Jeremy 6d00292064 [REF] Replace temp name by real name
bzr revid: jke@openerp.com-20140505154246-8vahdzf60oiksm62
2014-05-05 17:42:46 +02:00
Kersten Jeremy d9c3c175bd [REF] Calendar refactoring - Manage allday in date field and not datetime.
bzr revid: jke@openerp.com-20140430093613-3tdn2tfiwshcahbz
2014-04-30 11:36:13 +02:00
Gery Debongnie 8135812d34 [FIX] moves the field definitions of models hr.job and hr.employee that should have been in submodules to their correct place (in hr_something) to avoid dependencies problems (addons hr, hr_*)
bzr revid: ged@openerp.com-20140415105419-wy026n5k10wo80wb
2014-04-15 12:54:19 +02:00
Kersten Jeremy f87524a257 [FIX] Set event from hr_holiday with a class confidential by default.
bzr revid: jke@openerp.com-20140225213121-hyz46xpsiqtao18o
2014-02-25 22:31:21 +01:00
jke-openerp 46b0c7aa00 [REF] Rename model crm.meeting into calendar.event
Remove 2 unsused field from calendar.event model (dir,sequence)

bzr revid: jke@openerp.com-20140115093805-1g1j1oymyxsb6kgh
2014-01-15 10:38:05 +01:00
jke-openerp 0072915549 [MERGE] Merge with trunk
bzr revid: jke@openerp.com-20140114135240-c7r0ma18f1ls2yae
2014-01-14 14:52:40 +01:00
Stephane Wirtel 0aadcf42c9 [FIX] hr_holidays: Reverse previous patch with the warning
bzr revid: stw@openerp.com-20140114114559-ri5ts0vgv2vmyfth
2014-01-14 12:45:59 +01:00
jke-openerp facb8547db [MERGE] Merge with trunk
bzr revid: jke@openerp.com-20140113193830-igvzvf8gsic5okm8
2014-01-13 20:38:30 +01:00
Stephane Wirtel e091efecb8 [FIX] hr_holidays: Use osv.except_osv instead exceptions.Warning, because
Warning does not inherit from osv.except_osv and this exception is not catched
by the system.

bzr revid: stw@openerp.com-20140113162727-5au3iimfz4d1mszw
2014-01-13 17:27:27 +01:00
jke-openerp 6bb986a2e5 [FIX] Fix according to APR's Review
- Access Right too restrictif for user
- Bug UI between Firefox and Chrome
- Bug UI many2many_tag cursor on bullet
- Temp Fix on email_template to manage partner_to
- Manage attendee from hr_holidays 
- Manage avatar_model in sidebar_items for filter (res.partner was hard coded)
- Remove quick add from HR-holiday, because some field (as day) is calculated on event "onchange"

bzr revid: jke@openerp.com-20131220141855-mbhxtr07fn0sroe0
2013-12-20 15:18:55 +01:00
jke-openerp 4ca6502d5e [MERGE] Merge with trunk
bzr revid: jke@openerp.com-20131219193521-gs6ty1p0uju8cc21
2013-12-19 20:35:21 +01:00
Denis Ledoux 291bc4a69d [FIX] hr_holidays: on change holiday type to employee tag, set employee to False.
Otherwise, the user who creates the allocation request by employee tag will benefit of the leaves he just entered, twice if he has the employee tag, once if has not the employee tag(and in this last case, he should not have this leave allocation, as he do not have the tag

bzr revid: dle@openerp.com-20131211180025-pg8kf13bt6d1vk9l
2013-12-11 19:00:25 +01:00
jke-openerp 74d698f42f [MERGE] Merge with trunk
bzr revid: jke@openerp.com-20131127175136-3qvs367ud509462n
2013-11-27 18:51:36 +01:00
jke-openerp 5f9ee3b2d2 [IMP] Bck not running
bzr revid: jke@openerp.com-20131123113627-csxj0qx8s030dhi7
2013-11-23 12:36:27 +01:00
Olivier Dony a0fab67694 [FIX] hr_holidays: leave holiday overlap should ignore cancelled/refused ones
Obviously a cancelled leave does not really
overlap with a new one.

bzr revid: odo@openerp.com-20131023162928-56vdsjxr8sa4n3jv
2013-10-23 18:29:28 +02:00
Olivier Dony 58928c5c4c [FIX] hr_holidays: force draft.@flow_start to False to correctly update existing databases + fix validation logic
The check_holidays() validation was not working correctly
because it was called both before and after inserting new
leave requests, with inconsistent results.
Using it as a fixed constraint is simpler.

bzr revid: odo@openerp.com-20131015165416-in0rfd7rrjmekv0g
2013-10-15 18:54:16 +02:00
Thibault Delavallée 08b0784e76 [IMP] hr_holidays:
- added a workflow transition from refuse to draft, to allow resetting
a refused request
- resetting is now based on a can_reset field, taht is based on whether
it is my own request or I am an hr manager
- added an access right on crm_meeting that was preventing hr officers
to validate some requests
- improved form view to show reset to draft button accordingly
- added tests that helped trigerred the various bugs and improvements

bzr revid: tde@openerp.com-20130809144752-o21pjbc56o0t8fym
2013-08-09 16:47:52 +02:00
Thibault Delavallée 7f1e1c7246 [IMP] hr_holidays: workflow update
starts in confirm
from confirm, possible to get back to draft with reset signal, calling old set_to_draft, now
renamed holidays_reset, in the same workflow
from draft, possible to go to confirm

bzr revid: tde@openerp.com-20130805113023-1cs1s18dd5m4mi20
2013-08-05 13:30:23 +02:00
Thibault Delavallée a87af992bb [IMP] hr_holidays: cleaning + improve check_holidays
bzr revid: tde@openerp.com-20130724122754-59xa1k8vo81dsb7b
2013-07-24 14:27:54 +02:00
Thibault Delavallée 56b10caba5 [IMP] hr_holidays: also calculates virutal remaining leaves
bzr revid: tde@openerp.com-20130724112130-3tsptifx6er4yww4
2013-07-24 13:21:30 +02:00
Amit Bhavsar (Open ERP) 98f39f9d22 [MERGE] merge with latest trunk
bzr revid: amb@tinyerp.com-20130701111430-t5qp9hm97rkmjpsp
2013-07-01 16:44:30 +05:30
Thibault Delavallée bf4ada34b4 [REF] mail_thread: message_track now uses browse records instead of read results.
Updated addons accordingly.
Updated tests to test corner cases using False / null browse records.

bzr revid: tde@openerp.com-20130627144647-swbj77i84vo9ii0v
2013-06-27 16:46:47 +02:00
Vishmita Jadeja (openerp) fe128d7498 [Merge]Merge lp:openobject-addons
bzr revid: vja@tinyerp.com-20130418090337-51vfkhfl3lzg7mpf
2013-04-18 14:33:37 +05:30