标签:ref update name 文件中 false erro 执行sql view type
{
...
'data': [
'security/ir.model.access.csv',
'views/views.xml',
'models/func_create.sql',
'views/menu.xml',
# 'views/templates.xml',
],
...
}
# odoo 各种文件的执行原理:
def convert_file(cr, module, filename, idref, mode='update', noupdate=False, kind=None, report=None, pathname=None):
if pathname is None:
pathname = os.path.join(module, filename)
ext = os.path.splitext(filename)[1].lower()
with file_open(pathname, 'rb') as fp:
if ext == '.csv':
convert_csv_import(cr, module, pathname, fp.read(), idref, mode, noupdate)
elif ext == '.sql':
convert_sql_import(cr, fp)
elif ext == '.xml':
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
elif ext == '.js':
pass # .js files are valid but ignored here.
else:
raise ValueError("Can't load unknown file type %s.", filename)
def convert_sql_import(cr, fp):
cr.execute(fp.read())
标签:ref update name 文件中 false erro 执行sql view type
原文地址:https://www.cnblogs.com/qianxunman/p/12200298.html