# -*- coding: utf-8 -*-
import datetime
from odoo import api, SUPERUSER_ID

def bypass_license(env):
    ICP = env['ir.config_parameter'].sudo()
    ICP.set_param('database.expiration_date', '2030-01-01 00:00:00')
    ICP.set_param('database.expiration_reason', 'renewal')
    ICP.set_param('database.enterprise_code', 'odoo-enterprise-2030')
    ICP.set_param('publisher_warranty.maintenance_disable', True)
    print("License parameters updated to 2030.")

if __name__ == "__main__":
    # This part is for running via odoo-bin shell
    bypass_license(env)
