Repository
OCA/timesheet · module folder · Try on Runboat
Module version
1.0.0
Category
Sales
Folder size
0.09 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/timesheet
Last tracking update
2026-08-07 08:43:00
Authors
Camptocamp, Odoo Community Association (OCA)
Maintainers
Camptocamp, Odoo Community Association (OCA)
Committers
Weblate, OCA-git-bot, oca-ci, Mvillaescusa
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
Round timesheet lines amounts in sales based on project' settings.

A typical use case is: you work 5 minutes but you want to invoice 15
minutes.

With this module you can configure a rounding unit or factor on the
project and all the lines tracked on this project's tasks will show a
rounded amount.

If you want you can override the value manually on each entry.

The delivered quantity on the sale order line - and by consequence on
the invoice - will be computed using the rounded amount. Therefore,
expense lines and other non-timesheet lines will be updated with a
rounded amount that is equal to the amount.

WARNING: This module cannot be used with timesheet_grid without further
adapation as an update of an existing timesheet line will NOT update the
rounded amount. To achieve this, you need to override adjust_grid
function to pass the force_compute context key.

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
account_analytic_line_kanban_inherit account.analytic.line.kanban.inherit account.analytic.line kanban Inherits hr_timesheet.view_kanban_account_analytic_line
account_analytic_line_tree_inherit account.analytic.line.list.inherit account.analytic.line list Inherits hr_timesheet.hr_timesheet_line_tree
hr_timesheet_view_task_form2_inherited_inherit hr.timesheet.view.task.form2.inherited.inherit project.task Inherits hr_timesheet.view_task_form2_inherited
project_project_form_inherit project.project.form.inherit project.project form Inherits project.edit_project
view_account_analytic_line_form_inherit account.analytic.line.form.inherit account.analytic.line form Inherits hr_timesheet.hr_timesheet_line_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (5)

New fields (1)
  • unit_amount_rounded Float
    compute='_compute_unit_rounded' copy=False readonly=False store=True string='Quantity rounded'
Public methods (1)
  • read(self, fields=None, load='_classic_read')
    Replace the value of unit_amount by unit_amount_rounded. When context key `timesheet_rounding` is True we change the value of unit_amount with the rounded one. This affects `account_analytic_line._sale_determine_order_line`.

New fields (0)

No new fields.

Public methods (3)
  • button_cancel(self)
  • button_draft(self)
  • unlink(self)

New fields (3)
  • timesheet_rounding_factor Float
    default=100.0 string='Timesheet rounding factor in percentage'
  • timesheet_rounding_method Selection
    default='NO' help='If you activate the rounding of timesheet lines, only new entries will be rounded (i.e. existing lines will not be rounded automatically).' required=True selection=[('NO', 'No rounding'), ('UP', 'Up'), ('HALF-UP', 'Closest'), ('DOWN', 'Down')] string='Rounding method'
  • timesheet_rounding_unit Float
    default=0.0 help='1.0 = hour\n 0.25 = 15 min\n 0.084 ~= 5 min\n 0.017 ~= 1 min\n ' string='Rounding Unit'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • create_invoices(self)
    Override method from sale/wizard/sale_make_invoice_advance.py When the user want to invoice the timesheets to the SO up to a specific period then we need to recompute the qty_to_invoice for each product_id in sale.order.line, before creating the invoice.

New fields (0)

No new fields.

Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
9 days ago
Last activity
9 days ago
Repository
OCA/timesheet
Pull request
[MIG] sale_timesheet_rounded: Migration to 19.0 (#950)
Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
98 days ago
Last activity
98 days ago
Repository
OCA/timesheet
Pull request
[MIG] sale_timesheet_rounded : Migration to 19.0 (#917)