mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] - Set recurring_invoicing_type for existing products set to monthlylastday
This commit is contained in:
10
product_contract/migrations/12.0.3.0.0/pre-migration.py
Normal file
10
product_contract/migrations/12.0.3.0.0/pre-migration.py
Normal file
@@ -0,0 +1,10 @@
|
||||
def migrate(cr, version):
|
||||
# pre-paid/post-paid becomes significant for monthlylastday too,
|
||||
# make sure it has the value that was implied for previous versions.
|
||||
cr.execute(
|
||||
"""\
|
||||
UPDATE product_template
|
||||
SET recurring_invoicing_type = 'post-paid'
|
||||
WHERE recurring_rule_type = 'monthlylastday'
|
||||
"""
|
||||
)
|
||||
Reference in New Issue
Block a user