[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
This commit is contained in:
committed by
Laurent Stukkens (LTU)
parent
1ba83ad0ee
commit
2fa26c4fd8
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user