[12.0][FIX] account_asset_management: fix error in parent to group migration

Return the id from the subselect by its column name in the main query. Fixes
incomplete and incorrect group assignment during the migration.
This commit is contained in:
Stefan Rijnhart
2021-04-23 17:56:35 +02:00
parent 2c609c457b
commit 6cccea0193

View File

@@ -28,7 +28,7 @@ def create_asset_groups(cr):
LEFT JOIN account_asset_group aag2
ON aag2.{origin_column} = va.{parent_column}
WHERE {parent_column} {rest_sql}
RETURNING id
RETURNING {origin_column}
""")
isnull = sql.SQL("IS NULL")
inids = sql.SQL("IN %(ids)s")