Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Sales Timesheet

Entity: project.project

Compute Method: _compute_timesheet_product_id

Inputs Method Outputs
default_product = self.env.ref('sale_timesheet.time_product', False)
for project in self:
            if not project.allow_timesheets or not project.allow_billable:
                project.timesheet_product_id = False
            elif not project.timesheet_product_id:
                project.timesheet_product_id = default_product

Back to entity