Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@openupgrade.migrate(use_env=True)
def migrate(env, version):
""" Completamos fecha a nuevo campo:
* tomando de payment_date si está seteado
* tomando de confirmation_date si ya se paso a proceso de firma pero no
tenemos payment_date
"""
cr = env.cr
cr.execute("""
UPDATE account_payment_group set to_signature_date=payment_date
WHERE payment_date is not null
""")
cr.execute("""
UPDATE account_payment_group set to_signature_date=confirmation_date