Skip to content

Commit

Permalink
[OU-FIX] commission: Set settlement type to sale_invoice
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pedrobaeza authored Aug 6, 2024
1 parent 38a923c commit cb3f7e3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions commission/migrations/15.0.2.0.0/post-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
"""
)

0 comments on commit cb3f7e3

Please sign in to comment.