From c576800813c1bb87c3f90ba768674b3ba128ed89 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 9 Oct 2018 08:15:53 +0000 Subject: [PATCH] [FIX] hr_expense: AccessError on product - Install hr_expense and stock. - Add enough products which can be expensed so that a 'Search More...' option is proposed. - Restrict the rights of a user U to 'Employee' only. - As U, create an expense, and click on the 'Search More...' option when choosing the product An AccessError is raised on `stock.move`. The error is due to fields `qty_available` and `virtual_quantity`. These fields are not necessary in that context, so we define a specific tree view for this use case. opw-1891399 closes odoo/odoo#27561 --- addons/hr_expense/views/hr_expense_views.xml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/addons/hr_expense/views/hr_expense_views.xml b/addons/hr_expense/views/hr_expense_views.xml index 5eb7461ff3c..ca6e143e260 100644 --- a/addons/hr_expense/views/hr_expense_views.xml +++ b/addons/hr_expense/views/hr_expense_views.xml @@ -49,7 +49,7 @@ - +