Migrate hr_timesheet user_id

bzr revid: ced-d8a7e81e2a05a6b828db01df087f5e074d350eda
This commit is contained in:
ced 2006-12-29 07:33:56 +00:00
parent 180ce7de23
commit 0aabc33792
1 changed files with 7 additions and 0 deletions

View File

@ -72,6 +72,13 @@ password = hasattr(options, 'db_password') and "password=%s" % options.db_passwo
db = psycopg.connect('%s %s %s %s %s' % (host, port, name, user, password), serialize=0)
cr = db.cursor()
# ---------------------------------------------------------------- #
# move user id from hr_analytic_timesheet to account_analytic_line #
# ---------------------------------------------------------------- #
cr.execute("UPDATE account_analytic_line SET user_id = hr_analytic_timesheet.user_id FROM hr_analytic_timesheet WHERE hr_analytic_timesheet.line_id = account_analytic_line.id")
cr.commit()
# --------------- #
# remove old menu #
# --------------- #