Ciao a tutti, ho un problemino con i menù.
Ho creato un modulo nuovo e non capisco perchè ma quando provo ad installarlo mi da questo errore:
Server Traceback (most recent call last):
File "/home/openerp/lp/openerp/openerp/addons/web/session.py", line 90, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/home/openerp/lp/openerp/openerp/netsvc.py", line 289, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/openerp/lp/openerp/openerp/service/web_services.py", line 614, in dispatch
res = fn(db, uid, *params)
File "/home/openerp/lp/openerp/openerp/osv/osv.py", line 169, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/openerp/lp/openerp/openerp/osv/osv.py", line 123, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/openerp/lp/openerp/openerp/osv/osv.py", line 179, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/openerp/lp/openerp/openerp/osv/osv.py", line 166, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/openerp/lp/openerp/openerp/addons/base/module/module.py", line 425, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "/home/openerp/lp/openerp/openerp/addons/base/module/module.py", line 476, in _button_immediate_function
_, pool = pooler.restart_pool(cr.dbname, update_module=True)
File "/home/openerp/lp/openerp/openerp/pooler.py", line 39, in restart_pool
registry = RegistryManager.new(db_name, force_demo, status, update_module)
File "/home/openerp/lp/openerp/openerp/modules/registry.py", line 214, in new
openerp.modules.load_modules(registry.db, force_demo, status, update_module)
File "/home/openerp/lp/openerp/openerp/modules/loading.py", line 347, in load_modules
processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module)
File "/home/openerp/lp/openerp/openerp/modules/loading.py", line 258, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/home/openerp/lp/openerp/openerp/modules/loading.py", line 190, in load_module_graph
load_data(module_name, idref, mode)
File "/home/openerp/lp/openerp/openerp/modules/loading.py", line 75, in <lambda>
load_data = lambda *args: _load_data(cr, *args, kind='data')
File "/home/openerp/lp/openerp/openerp/modules/loading.py", line 126, in _load_data
tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)
File "/home/openerp/lp/openerp/openerp/tools/convert.py", line 954, in convert_xml_import
obj.parse(doc.getroot())
File "/home/openerp/lp/openerp/openerp/tools/convert.py", line 847, in parse
self._tags[rec.tag](self.cr, rec, n)
File "/home/openerp/lp/openerp/openerp/tools/convert.py", line 585, in _tag_menuitem
a_type, a_id = self.model_id_get(cr, a_action)
File "/home/openerp/lp/openerp/openerp/tools/convert.py", line 833, in model_id_get
return model_data_obj.get_object_reference(cr, self.uid, mod, id_str)
File "/home/openerp/lp/openerp/openerp/tools/cache.py", line 18, in lookup
r = self.lookup(self2, cr, *args)
File "/home/openerp/lp/openerp/openerp/tools/cache.py", line 46, in lookup
value = d[key] = self.method(self2, cr, *args)
File "/home/openerp/lp/openerp/openerp/addons/base/ir/ir_model.py", line 861, in get_object_reference
data_id = self._get_id(cr, uid, module, xml_id)
File "/home/openerp/lp/openerp/openerp/tools/cache.py", line 18, in lookup
r = self.lookup(self2, cr, *args)
File "/home/openerp/lp/openerp/openerp/tools/cache.py", line 46, in lookup
value = d[key] = self.method(self2, cr, *args)
File "/home/openerp/lp/openerp/openerp/addons/base/ir/ir_model.py", line 854, in _get_id
raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id))
ValueError: No such external ID currently defined in the system: import_documenti.action_aggiorna_dati_lista
Io nell'xml del modulo ho inserito questa voce di menu.
<menuitem action="action_aggiorna_dati_lista" id="menu_aggiorna_lista_bolle" parent="base.menu_import_documenti" sequence="20" groups="base.group_sale_salesman,base.group_sale_manager" />
L'azione si trova in un altro xml nella cartella wizard ed è così definita:
<act_window id="action_aggiorna_dati_lista"
key2="aggiorna_dati_lista"
name="Aggiorna Lista bolle"
res_model="import.documenti"
src_model="import.documenti"
view_mode="form" target="new"/>
Scusate ma non riesco a capire cosa sbaglio.
Mi sembra che l'errore sia dovuto a qualcosa nella parte di XML.
Lo stesso errore me lo data anche in un'altra action che avevo definito sempre nello stesso file xml e non nel wizard.
Grazie