Skip to content
Health
75/100
good
  • Security25/25
    No findings
  • Activity20/25
    Last human commit 10 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity25/25
    In 7 Odoo series since 12.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.09 MB
Module directory on disk
Code analysis 1 migration note 5 models 5 views 0 HTTP endpoints

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.

Dependencies

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

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…

Loading…