Merge PR #493 into 12.0

Signed-off-by sbejaoui
This commit is contained in:
OCA-git-bot
2020-03-30 09:16:54 +00:00

View File

@@ -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'
) """
)