From 8495dced7f3a918abfc3c0d2179544b52fce6369 Mon Sep 17 00:00:00 2001 From: Aman Patel Date: Tue, 27 Jun 2023 09:28:01 +0000 Subject: [PATCH] [FIX] sale_timesheet: prevent certain selection options Steps: - Open sales. - Go to products. - Create a new product. - Keep the 'Can be sold' option unchecked. Issue: - If a product is not sellable then the user should not be able to create invoicing policy 'Based on Timesheets' or 'Based on Milestones'. Fix: - We are raising the user error 'This option is only for sellable products.' when a user tries to select any of these two options. task-3378532 closes odoo/odoo#145631 X-original-commit: 94982163f81175c9d2d670dc28704a716696604f Signed-off-by: Xavier Bol (xbo) --- addons/sale_project/views/product_views.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sale_project/views/product_views.xml b/addons/sale_project/views/product_views.xml index c3c0995f70c..d507a10a4f9 100644 --- a/addons/sale_project/views/product_views.xml +++ b/addons/sale_project/views/product_views.xml @@ -7,10 +7,10 @@ - type == 'service' + type == 'service' and sale_ok == True - +