From 2fa26c4fd8e2d116a7973c995cd5492897cec4ed Mon Sep 17 00:00:00 2001 From: "Xavier BOL (xbo)" Date: Mon, 6 Sep 2021 15:05:52 +0200 Subject: [PATCH] [FIX] sale_timesheet: not filter project template based pricing type Before this commit, in the product, the user can select one of billable projects with `allow_timesheets=True` and `pricing_type='task_rate'` but the pricing type is not useful now, since we don't have anymore the `bill_type` and `pricing_type` fields visible. Now the pricing_type is computed based on the SOL and employee mappings on the project. This commit removes the pricing type in the domain for `project_template_id` field in product model. So, now the user can select a project billable with `allow_timesheets=True`. task-2638359 closes #76166 X-original-commit: ac32f966672c2e3f29f639e441781a5bc6c396e0 --- 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 f2f6b5f82c9..18b8bed87cb 100644 --- a/addons/sale_timesheet/models/product.py +++ b/addons/sale_timesheet/models/product.py @@ -27,7 +27,7 @@ class ProductTemplate(models.Model): ], ondelete={'timesheet': 'set default'}) # override domain project_id = fields.Many2one(domain="[('company_id', '=', current_company_id), ('allow_billable', '=', True), ('pricing_type', '=', 'task_rate'), ('allow_timesheets', 'in', [service_policy == 'delivered_timesheet', True])]") - project_template_id = fields.Many2one(domain="[('company_id', '=', current_company_id), ('allow_billable', '=', True), ('pricing_type', '!=', 'task_rate'), ('allow_timesheets', 'in', [service_policy == 'delivered_timesheet', True])]") + project_template_id = fields.Many2one(domain="[('company_id', '=', current_company_id), ('allow_billable', '=', True), ('allow_timesheets', 'in', [service_policy == 'delivered_timesheet', True])]") service_upsell_threshold = fields.Float('Threshold', default=1, help="Percentage of time delivered compared to the prepaid amount that must be reached for the upselling opportunity activity to be triggered.") service_upsell_threshold_ratio = fields.Char(compute='_compute_service_upsell_threshold_ratio')