[IMP]: access rights checking stopped for osv_memory objects, filter and shortcut creation rights added for all groups
bzr revid: rvo@tinyerp.co.in-20100413073228-earaglnoo4hr2x3r
This commit is contained in:
parent
a30e469839
commit
b481a12eea
|
@ -306,7 +306,7 @@ def load_information_from_description_file(module):
|
|||
if os.path.isfile(description_file):
|
||||
return eval(tools.file_open(description_file).read())
|
||||
|
||||
#TODO: refactor the logger in this file to follow the logging guidelines
|
||||
#TODO: refactor the logger in this file to follow the logging guidelines
|
||||
# for 6.0
|
||||
logging.getLogger('addons').debug('The module %s does not contain a description file:'\
|
||||
'__openerp__.py or __terp__.py (deprecated)', module)
|
||||
|
@ -595,14 +595,14 @@ class MigrationManager(object):
|
|||
log = logging.getLogger('init')
|
||||
|
||||
def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs):
|
||||
|
||||
|
||||
def process_sql_file(cr, file):
|
||||
queries = fp.read().split(';')
|
||||
for query in queries:
|
||||
new_query = ' '.join(query.split())
|
||||
if new_query:
|
||||
cr.execute(new_query)
|
||||
|
||||
|
||||
def load_init_update_xml(cr, m, idref, mode, kind):
|
||||
for filename in package.data.get('%s_xml' % kind, []):
|
||||
logger.notifyChannel('init', netsvc.LOG_INFO, 'module %s: loading %s' % (m, filename))
|
||||
|
@ -631,20 +631,20 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs):
|
|||
else:
|
||||
tools.convert_xml_import(cr, m, fp, idref, mode=mode, noupdate=True, **kwargs)
|
||||
fp.close()
|
||||
|
||||
|
||||
def load_data(cr, module_name, id_map, mode):
|
||||
_load_data(cr, module_name, id_map, mode, 'data')
|
||||
|
||||
|
||||
def load_demo(cr, module_name, id_map, mode):
|
||||
_load_data(cr, module_name, id_map, mode, 'demo')
|
||||
|
||||
|
||||
def load_test(cr, module_name, id_map, mode):
|
||||
cr.commit()
|
||||
try:
|
||||
_load_data(cr, module_name, id_map, mode, 'test')
|
||||
finally:
|
||||
cr.rollback()
|
||||
|
||||
|
||||
def _load_data(cr, module_name, id_map, mode, kind):
|
||||
noupdate = (kind == 'demo')
|
||||
for filename in package.data.get(kind, []):
|
||||
|
@ -660,7 +660,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs):
|
|||
else:
|
||||
tools.convert_xml_import(cr, module_name, file, id_map, mode, noupdate)
|
||||
file.close()
|
||||
|
||||
|
||||
# **kwargs is passed directly to convert_xml_import
|
||||
if not status:
|
||||
status = {}
|
||||
|
@ -722,11 +722,11 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs):
|
|||
if hasattr(package, 'demo') or (package.dbdemo and package.state != 'installed'):
|
||||
status['progress'] = (float(statusi)+0.75) / len(graph)
|
||||
load_demo_xml(cr, m, idref, mode)
|
||||
load_demo(cr, m, idref, mode)
|
||||
load_demo(cr, m, idref, mode)
|
||||
cr.execute('update ir_module_module set demo=%s where id=%s', (True, mid))
|
||||
|
||||
|
||||
load_test(cr, m, idref, mode)
|
||||
|
||||
|
||||
package_todo.append(package.name)
|
||||
|
||||
migrations.migrate_module(package, 'post')
|
||||
|
@ -830,6 +830,9 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
|
|||
if has_updates:
|
||||
cr.execute("""select model,name from ir_model where id not in (select model_id from ir_model_access)""")
|
||||
for (model, name) in cr.fetchall():
|
||||
obj = pool.get(model)
|
||||
if osv.osv.osv_memory in obj.__class__.__bases__:
|
||||
continue
|
||||
logger.notifyChannel('init', netsvc.LOG_WARNING, 'object %s (%s) has no access rules!' % (model, name))
|
||||
|
||||
cr.execute("SELECT model from ir_model")
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
"access_ir_sequence_group_user","ir_sequence group_user","model_ir_sequence",,1,1,1,1
|
||||
"access_ir_sequence_type_group_user","ir_sequence_type group_user","model_ir_sequence_type",,1,0,0,0
|
||||
"access_ir_translation_group_system","ir_translation group_system","model_ir_translation",,1,1,1,1
|
||||
"access_ir_ui_menu_group_user","ir_ui_menu group_user","model_ir_ui_menu",,1,0,0,0
|
||||
"access_ir_ui_menu_group_user","ir_ui_menu group_user","model_ir_ui_menu",,1,0,1,0
|
||||
"access_ir_ui_menu_group_system","ir_ui_menu group_system","model_ir_ui_menu","group_system",1,1,1,1
|
||||
"access_ir_ui_view_group_user","ir_ui_view group_user","model_ir_ui_view",,1,0,0,0
|
||||
"access_ir_ui_view_group_system","ir_ui_view group_system","model_ir_ui_view","group_system",1,1,1,1
|
||||
|
@ -37,7 +37,7 @@
|
|||
"access_ir_ui_view_custom_group_system","ir_ui_view_custom_group_system","model_ir_ui_view_custom","group_system",1,1,1,1
|
||||
"access_ir_ui_view_sc_group_user","ir_ui_view_sc group_user","model_ir_ui_view_sc",,1,1,1,1
|
||||
"access_ir_values_group_erp_manager","ir_values group_erp_manager","model_ir_values","group_erp_manager",1,1,1,1
|
||||
"access_ir_values_group_all","ir_values group_all","model_ir_values",,1,0,0,0
|
||||
"access_ir_values_group_all","ir_values group_all","model_ir_values",,1,0,1,0
|
||||
"access_wizard_ir_model_menu_create_group_system","wizard_ir_model_menu_create group_system","model_wizard_ir_model_menu_create","group_system",1,1,1,1
|
||||
"access_wizard_ir_model_menu_create_line_group_system","wizard_ir_model_menu_create_line group_system","model_wizard_ir_model_menu_create_line","group_system",1,1,1,1
|
||||
"access_wizard_module_lang_export_group_system","wizard_module_lang_export group_system","model_wizard_module_lang_export","group_system",1,1,1,1
|
||||
|
@ -89,7 +89,7 @@
|
|||
"access_res_users_group_erp_manager","res_users group_erp_manager","model_res_users","group_erp_manager",1,1,1,1
|
||||
"access_ir_actions_all","ir_actions_all","model_ir_actions_actions",,1,0,0,0
|
||||
"access_ir_actions_group_system","ir_actions_group_system","model_ir_actions_actions","group_system",1,1,1,1
|
||||
"access_ir_actions_act_window_all","ir_actions_act_window_all","model_ir_actions_act_window",,1,0,0,0
|
||||
"access_ir_actions_act_window_all","ir_actions_act_window_all","model_ir_actions_act_window",,1,0,1,0
|
||||
"access_ir_actions_act_window_system","ir_actions_act_window_system","model_ir_actions_act_window","group_system",1,1,1,1
|
||||
"access_ir_actions_act_window_close_all","ir_actions_act_window_close_all","model_ir_actions_act_window_close",,1,0,0,0
|
||||
"access_ir_actions_act_window_close_group_system","ir_actions_act_window_close_group_system","model_ir_actions_act_window_close","group_system",1,1,1,1
|
||||
|
|
|
Loading…
Reference in New Issue