Files
odoo_source/addons/sale_timesheet/__init__.py
T
Cedric Prieels (cpr) da1b2c0c3c [IMP] hr_timesheet,timesheet_grid: add new pivot measures and generic improvements
A new report was created for timesheets, also introducing new measures regarding
the (non-)billable time (percentage) and the timesheets revenues/costs. Some general
improvements were furthermore introduced in the timesheet apps.

See task-2783955

closes odoo/odoo#88072

Related: odoo/upgrade#3509
Related: odoo/enterprise#25922
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-20 17:53:10 +02:00

22 lines
771 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import controllers
from . import models
from . import wizard
from . import report
from odoo import api, SUPERUSER_ID
def uninstall_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
env.ref("account.account_analytic_line_rule_billing_user").write({'domain_force': "[(1, '=', 1)]"})
def _sale_timesheet_post_init(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
products = env['product.template'].search([('detailed_type', '=', 'service'), ('invoice_policy', '=', 'order'), ('service_type', '=', 'manual')])
for product in products:
product.service_type = 'timesheet'
product._compute_service_policy()