From fec06bbb5976802abb15f7bc60e6a48546048025 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 16 Nov 2015 18:57:55 +0100 Subject: [PATCH] Add module hr_expense_usability --- hr_expense_usability/README.rst | 14 +++++++ hr_expense_usability/__init__.py | 1 + hr_expense_usability/__openerp__.py | 38 +++++++++++++++++++ .../security/expense_security.xml | 24 ++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 hr_expense_usability/README.rst create mode 100644 hr_expense_usability/__init__.py create mode 100644 hr_expense_usability/__openerp__.py create mode 100644 hr_expense_usability/security/expense_security.xml diff --git a/hr_expense_usability/README.rst b/hr_expense_usability/README.rst new file mode 100644 index 0000000..a146e84 --- /dev/null +++ b/hr_expense_usability/README.rst @@ -0,0 +1,14 @@ +HR Expense Usability +==================== + +This module adds a few usability enhancements to the official Expense modules: + +* Re-organise access rights: Officer can see the expense notes of his subordinates ; Manager can see all expense notes + +Credits +======= + +Contributors +------------ + +* Alexis de Lattre diff --git a/hr_expense_usability/__init__.py b/hr_expense_usability/__init__.py new file mode 100644 index 0000000..40a96af --- /dev/null +++ b/hr_expense_usability/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/hr_expense_usability/__openerp__.py b/hr_expense_usability/__openerp__.py new file mode 100644 index 0000000..ada6262 --- /dev/null +++ b/hr_expense_usability/__openerp__.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# HR Expense Usability module for Odoo +# Copyright (C) 2015 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + + +{ + 'name': 'HR Expense Usability', + 'version': '0.1', + 'category': 'Human Resources', + 'license': 'AGPL-3', + 'summary': 'Better usability for the management of expenses', + 'description': '', + 'author': 'Akretion', + 'website': 'http://www.akretion.com', + 'depends': ['hr_expense'], + 'data': [ + 'security/expense_security.xml', + ], + 'installable': True, +} diff --git a/hr_expense_usability/security/expense_security.xml b/hr_expense_usability/security/expense_security.xml new file mode 100644 index 0000000..da78ed2 --- /dev/null +++ b/hr_expense_usability/security/expense_security.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + HR Officer can see expenses of his subordinates + + ['|', ('employee_id.user_id','=',user.id), ('employee_id','child_of',user.employee_ids.ids)] + + + + +