[REM] sale_timesheet: remove display_create_order field

The field `display_create_order` is no longer used anywhere and can safely be removed

closes odoo/odoo#128986

Enterprise: https://github.com/odoo/enterprise/pull/44765
Upgrade: https://github.com/odoo/upgrade/pull/4996
Related: odoo/enterprise#44765
Related: odoo/upgrade#4996
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
Vincent Larcin
2023-08-07 19:57:24 +02:00
parent c3157da12f
commit 57fe90b449
-6
View File
@@ -41,7 +41,6 @@ class Project(models.Model):
billable_percentage = fields.Integer(
compute='_compute_billable_percentage', groups='hr_timesheet.group_hr_timesheet_approver',
help="% of timesheets that are billable compared to the total number of timesheets linked to the AA of the project, rounded to the unit.")
display_create_order = fields.Boolean(compute='_compute_display_create_order')
timesheet_product_id = fields.Many2one(
'product.product', string='Timesheet Product',
domain="""[
@@ -136,11 +135,6 @@ class Project(models.Model):
billable_percentage = timesheet_billable / timesheet_total * 100 if timesheet_total > 0 else 0
project.billable_percentage = round(billable_percentage)
@api.depends('partner_id', 'pricing_type')
def _compute_display_create_order(self):
for project in self:
project.display_create_order = project.partner_id and project.pricing_type == 'task_rate'
@api.depends('allow_timesheets', 'allow_billable')
def _compute_timesheet_product_id(self):
default_product = self.env.ref('sale_timesheet.time_product', False)