summaryrefslogtreecommitdiff
path: root/addons/hr_expense/security
diff options
context:
space:
mode:
authord-fence <moc@odoo.com>2016-09-15 11:16:28 +0200
committerYannick Tivisse <yti@odoo.com>2017-09-01 15:30:30 +0200
commitc030213fa3b822b1ea373c77b552bfda716a3900 (patch)
tree017ff7ebc3d17fd6da7eabc815c090daeaaa2d04 /addons/hr_expense/security
parent5b7e991c42c8563c6306e1c6cc529c5efd04320a (diff)
[IMP] hr_expense: Allow a user to refuse an expense sheet from a line
Purpose ======= Currently, a manager or a accountant can only refuse one expense report with a justification message. If there are a lot of lines too comment individually or if only one line should be modified, the manager or the accountant can now refused one line and give a reason for it. That will refused the expense report automatically while waiting the employee to make the modifications. Specification ============= - Rename wizard files, models and ids according to the model - Allow to refuse one or several lines with a reason - Use a qweb template to log messages, use message_post_with_view instead of message_post - Print expense name instead of sheet name. In the log when expense is refused, it prints expense report name instead of expense - Prevent modifying approved expenses * A user should not be able to modify an expense once approved * Method refuse_expense renamed to refuse_sheet when applied to a whole expense report/sheet * 'model' dict key renamed to something more explicit and less prone to confusion (passed in context to the refuse wizard) * Usage of explicit fields in the wizard to avoid confusion * Overriding 'default_get' to get default values for those fields - When an expense is paid or reported, it must be impossible to refuse it. - Replace refused expenses tree Purpose: The menu 'Refused expenses' is confusing. This improvement replaces it by 'Refused Reports' and leads to the refused reports tree view. That way, it's easier for the user to find back his refused expenses reports. - Hide create button on refused
Diffstat (limited to 'addons/hr_expense/security')
-rw-r--r--addons/hr_expense/security/ir_rule.xml5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/hr_expense/security/ir_rule.xml b/addons/hr_expense/security/ir_rule.xml
index e86d91211d8..7148e828231 100644
--- a/addons/hr_expense/security/ir_rule.xml
+++ b/addons/hr_expense/security/ir_rule.xml
@@ -6,7 +6,10 @@
<field name="name">Manager Expense</field>
<field name="model_id" ref="model_hr_expense"/>
<field name="domain_force">[(1, '=', 1)]</field>
- <field name="groups" eval="[(4, ref('account.group_account_user')), (4, ref('hr_expense.group_hr_expense_manager')), (4, ref('hr_expense.group_hr_expense_user'))]"/>
+ <field name="groups" eval="[
+ (4, ref('account.group_account_user')),
+ (4, ref('hr_expense.group_hr_expense_manager')),
+ (4, ref('hr_expense.group_hr_expense_user'))]"/>
</record>
<record id="property_rule_expense_employee" model="ir.rule">
<field name="name">Employee Expense</field>