summaryrefslogtreecommitdiff
path: root/addons/hr_holidays
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-01-19 17:15:56 +0100
committerChristophe Simonis <chs@odoo.com>2015-01-19 17:15:56 +0100
commit18e22be138f4d273ce8f63c0ff2c8a437cf6ce5d (patch)
tree63bd658de7b6fa0e91d521ca19322dd68bdc1492 /addons/hr_holidays
parentf6e5bf847b1a7107c09b009a757823b0f9514fa4 (diff)
parent0aab81cd3ac6881b2b64ccedb901b55badd421d4 (diff)
[MERGE] forward port of branch 8.0 up to 0aab81c
Diffstat (limited to 'addons/hr_holidays')
-rw-r--r--addons/hr_holidays/__openerp__.py1
-rw-r--r--addons/hr_holidays/hr_holidays.py12
-rw-r--r--addons/hr_holidays/tests/__init__.py5
3 files changed, 7 insertions, 11 deletions
diff --git a/addons/hr_holidays/__openerp__.py b/addons/hr_holidays/__openerp__.py
index 07ba46b13b5..4f1b2e2265d 100644
--- a/addons/hr_holidays/__openerp__.py
+++ b/addons/hr_holidays/__openerp__.py
@@ -44,7 +44,6 @@ You can keep track of leaves in different ways by following reports:
A synchronization with an internal agenda (Meetings of the CRM module) is also possible in order to automatically create a meeting when a holiday request is accepted by setting up a type of meeting in Leave Type.
""",
- 'images': ['images/hr_allocation_requests.jpeg', 'images/hr_leave_requests.jpeg', 'images/leaves_analysis.jpeg'],
'depends': ['hr', 'calendar', 'resource'],
'data': [
'security/ir.model.access.csv',
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index b8ec3793d71..a7f7d72b6c8 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -53,14 +53,14 @@ class hr_holidays_status(osv.osv):
# note: add only validated allocation even for the virtual
# count; otherwise pending then refused allocation allow
# the employee to create more leaves than possible
- status_dict['virtual_remaining_leaves'] += holiday.number_of_days
- status_dict['max_leaves'] += holiday.number_of_days
- status_dict['remaining_leaves'] += holiday.number_of_days
+ status_dict['virtual_remaining_leaves'] += holiday.number_of_days_temp
+ status_dict['max_leaves'] += holiday.number_of_days_temp
+ status_dict['remaining_leaves'] += holiday.number_of_days_temp
elif holiday.type == 'remove': # number of days is negative
- status_dict['virtual_remaining_leaves'] += holiday.number_of_days
+ status_dict['virtual_remaining_leaves'] -= holiday.number_of_days_temp
if holiday.state == 'validate':
- status_dict['leaves_taken'] -= holiday.number_of_days
- status_dict['remaining_leaves'] += holiday.number_of_days
+ status_dict['leaves_taken'] += holiday.number_of_days_temp
+ status_dict['remaining_leaves'] -= holiday.number_of_days_temp
return result
def _user_left_days(self, cr, uid, ids, name, args, context=None):
diff --git a/addons/hr_holidays/tests/__init__.py b/addons/hr_holidays/tests/__init__.py
index 08642bb5645..2d8d5ee4cdf 100644
--- a/addons/hr_holidays/tests/__init__.py
+++ b/addons/hr_holidays/tests/__init__.py
@@ -19,8 +19,5 @@
#
##############################################################################
-from openerp.addons.hr_holidays.tests import test_holidays_flow
+from . import test_holidays_flow
-checks = [
- test_holidays_flow,
-]