Skip to content

Instantly share code, notes, and snippets.

@guewen
Last active January 16, 2023 12:19
Show Gist options
  • Save guewen/09337a83379ed136fd2565c57c38fb03 to your computer and use it in GitHub Desktop.
Save guewen/09337a83379ed136fd2565c57c38fb03 to your computer and use it in GitHub Desktop.
odoo: load data file from shell
from odoo.tools import convert_file
convert_file(env.cr, 'account_invoice_sent', 'wizards/account_invoice_state_view.xml', {}, mode='update', kind='data')
env.cr.commit()
def reload(addon, path):
from odoo.tools import convert_file
convert_file(env.cr, addon, path, {}, mode='update', kind='data')
env.cr.commit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment