From 80f7c3fbd66f0edf9057e2a749e6c68791bb873c Mon Sep 17 00:00:00 2001 From: Vishnu Thuletiya Date: Mon, 9 Dec 2019 06:04:07 +0000 Subject: [PATCH] [FIX] sale_timesheet: fix default value in service invoicing policy Purpose of the task is to fix the default value of service invoicing policy of existing products when sale_timesheet is installed. when first sales app is installed and product is created with type service then later on sale_timesheet module is installed then on that product default value in service invoicing policy is none while the product is worked as 'Ordered quantities' so in compute set service invoicing policy to 'Ordered quantities' for those products. closes odoo/odoo#41515 Task: 2146778 Closes: #41515 Signed-off-by: Yannick Tivisse (yti) --- addons/sale_timesheet/models/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_timesheet/models/product.py b/addons/sale_timesheet/models/product.py index 1b30c6d7928..6e9372ac336 100644 --- a/addons/sale_timesheet/models/product.py +++ b/addons/sale_timesheet/models/product.py @@ -33,7 +33,7 @@ class ProductTemplate(models.Model): policy = None if product.invoice_policy == 'delivery': policy = 'delivered_manual' if product.service_type == 'manual' else 'delivered_timesheet' - elif product.invoice_policy == 'order' and product.service_type == 'timesheet': + elif product.invoice_policy == 'order' and (product.service_type == 'timesheet' or product.type == 'service'): policy = 'ordered_timesheet' product.service_policy = policy