oca-project/odoo-bringout-oca-project-project_timesheet_time_control/project_timesheet_time_control/hooks.py
Ernad Husremovic 6094c218b2 Move 124 sale modules to oca-sale, create oca-project with 56 project modules from oca-workflow-process
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-30 18:04:10 +02:00

13 lines
450 B
Python

# Copyright 2016-2017 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
def post_init_hook(cr, registry):
"""Put the date with 00:00:00 as the date_time for the line."""
cr.execute(
"""UPDATE account_analytic_line
SET date_time = to_timestamp(date || ' 00:00:00',
'YYYY/MM/DD HH24:MI:SS')
WHERE date(date_time) != date
"""
)