19 lines
466 B
Python
19 lines
466 B
Python
# -*- coding: utf-8 -*-
|
|
import odoo
|
|
from odoo import api, SUPERUSER_ID
|
|
from odoo.modules.registry import Registry
|
|
from odoo.modules.loading import load_modules
|
|
|
|
db_name = 'dev'
|
|
registry = Registry(db_name)
|
|
load_modules(registry)
|
|
|
|
cr = registry.cursor()
|
|
env = api.Environment(cr, SUPERUSER_ID, {})
|
|
|
|
print("--- EXECUTING DEMO REPOPULATION ---")
|
|
env['fleet.vehicle'].action_repopulate_demo_data()
|
|
cr.commit()
|
|
cr.close()
|
|
print("--- SUCCESS: DEMO DATA REPOPULATED! ---")
|