mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] migration from 11.0
Update product_contract/migrations/12.0.3.0.0/pre-migration.py Co-Authored-By: Bejaoui Souheil <souheil_bejaoui@hotmail.fr> Update product_contract/migrations/12.0.3.0.0/pre-migration.py Co-Authored-By: Bejaoui Souheil <souheil_bejaoui@hotmail.fr> [FIX]
This commit is contained in:
@@ -1,10 +1,14 @@
|
|||||||
|
from odoo.tools import parse_version
|
||||||
|
|
||||||
|
|
||||||
def migrate(cr, version):
|
def migrate(cr, version):
|
||||||
# pre-paid/post-paid becomes significant for monthlylastday too,
|
if parse_version(version) == parse_version('12.0.2.0.0'):
|
||||||
# make sure it has the value that was implied for previous versions.
|
# pre-paid/post-paid becomes significant for monthlylastday too,
|
||||||
cr.execute(
|
# make sure it has the value that was implied for previous versions.
|
||||||
"""\
|
cr.execute(
|
||||||
UPDATE product_template
|
"""\
|
||||||
SET recurring_invoicing_type = 'post-paid'
|
UPDATE product_template
|
||||||
WHERE recurring_rule_type = 'monthlylastday'
|
SET recurring_invoicing_type = 'post-paid'
|
||||||
"""
|
WHERE recurring_rule_type = 'monthlylastday'
|
||||||
)
|
"""
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user