From 1f67cea2fa65bd03acc98fbd9566966f9fd09e69 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 6 Aug 2024 09:04:06 +0200 Subject: [PATCH] [OU-FIX] commission: Set settlement type to sale_invoice The default value is 'manual', but all the previous existing ones are of 'sale_invoice' type, as in 14.0 there was no other settlement type. --- commission/migrations/15.0.2.0.0/post-migration.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/commission/migrations/15.0.2.0.0/post-migration.py b/commission/migrations/15.0.2.0.0/post-migration.py index a22e2f9aa..c7ec10973 100644 --- a/commission/migrations/15.0.2.0.0/post-migration.py +++ b/commission/migrations/15.0.2.0.0/post-migration.py @@ -20,3 +20,11 @@ def migrate(env, version): WHERE id = sal_rel.settlement_id """, ) + # All the existing settlements are of this type for now + openupgrade.logged_query( + env.cr, + """ + UPDATE commission_settlement + SET settlement_type = 'sale_invoice' + """, + )