Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def _fill_project_timesheet_product(env):
env.cr,
"""UPDATE project_project pp
SET timesheet_product_id = %s
WHERE pp.pricing_type IS NOT NULL AND pp.allow_timesheets""",
WHERE pp.pricing_type IS NOT NULL AND pp.allow_timesheets
AND timesheet_product_id IS NULL""",
(product.id,),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ def migrate(env, version):
openupgrade.rename_fields(env, _field_renames)
map_pricing_type(env)
openupgrade.logged_query(
env.cr, "ALTER TABLE project_project ADD timesheet_product_id int4"
env.cr,
"ALTER TABLE project_project ADD COLUMN IF NOT EXISTS timesheet_product_id int4",
)
Loading