Odoo Help


ValueError: No such external ID currently defined in the system: base.menu_address_book

on 10/23/13, 8:06 AM 9,122 views

when i try to install the module

Vehicles Management in Openerp v7.0 The following error occured .

OpenERP Server Error
Client Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1132, in call_button
    action = self._call_kw(req, model, method, args, {})
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 42, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

Server Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/server/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/openerp/addons/base/module/module.py", line 424, in button_immediate_install
    return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
  File "/opt/openerp/server/openerp/addons/base/module/module.py", line 475, in _button_immediate_function
    _, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/opt/openerp/server/openerp/pooler.py", line 39, in restart_pool
    registry = RegistryManager.new(db_name, force_demo, status, update_module)
  File "/opt/openerp/server/openerp/modules/registry.py", line 218, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/opt/openerp/server/openerp/modules/loading.py", line 345, in load_modules
    processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module)
  File "/opt/openerp/server/openerp/modules/loading.py", line 256, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/opt/openerp/server/openerp/modules/loading.py", line 188, in load_module_graph
    load_data(module_name, idref, mode)
  File "/opt/openerp/server/openerp/modules/loading.py", line 76, in <lambda>
    load_data = lambda *args: _load_data(cr, *args, kind='data')
  File "/opt/openerp/server/openerp/modules/loading.py", line 124, in _load_data
    tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)
  File "/opt/openerp/server/openerp/tools/convert.py", line 954, in convert_xml_import
  File "/opt/openerp/server/openerp/tools/convert.py", line 847, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/opt/openerp/server/openerp/tools/convert.py", line 568, in _tag_menuitem
    menu_parent_id = self.id_get(cr, rec.get('parent',''))
  File "/opt/openerp/server/openerp/tools/convert.py", line 824, in id_get
    res = self.model_id_get(cr, id_str)
  File "/opt/openerp/server/openerp/tools/convert.py", line 833, in model_id_get
    return model_data_obj.get_object_reference(cr, self.uid, mod, id_str)
  File "/opt/openerp/server/openerp/tools/cache.py", line 18, in lookup
    r = self.lookup(self2, cr, *args)
  File "/opt/openerp/server/openerp/tools/cache.py", line 46, in lookup
    value = d[key] = self.method(self2, cr, *args)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 868, in get_object_reference
    data_id = self._get_id(cr, uid, module, xml_id)
  File "/opt/openerp/server/openerp/tools/cache.py", line 18, in lookup
    r = self.lookup(self2, cr, *args)
  File "/opt/openerp/server/openerp/tools/cache.py", line 46, in lookup
    value = d[key] = self.method(self2, cr, *args)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 861, 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: base.menu_address_book

In the Openerp server log file say The error happends in the line of the vehicle.xml file

Parse error in /opt/openerp/server/openerp/addons/acy_partner_vehicle/vehicle.xml:52:

<menuitem action="action_partner_vehicle" name="vehicle" id="menu_partner_vehicle" parent="base.menu_address_book"/>

please add "base" in the depends list in your descriptor "__openerp__.py" and see

Abhishek H Menon
on 10/24/13, 2:56 AM

already add this in the dependent list.

on 10/24/13, 3:10 AM

Yes there is no menu id named menu_address_book in openerp v7. I have verifed. But in v6 it in partner_view.xml in module base/res/partner

Abhishek H Menon
on 10/24/13, 3:20 AM

Ok thanks Abhishek .. then what id will be added here instead of menu_address_book

on 10/24/13, 3:50 AM

I think your are trying to add res.partner.address model to your vehicle view. But in v7, res.partner and res.partner.address in v6 is combined a single res.partner in v7. Son here instead of menu_address_book use base.menu_config_address_book and see. Please view my answer.

Abhishek H Menon
on 10/24/13, 4:07 AM

Anil R. Kesariya

--Anil R. Kesariya--
| 6 5 8
Rajkot, India
--Anil R. Kesariya--

Odoo Techno Functional Expert

* Engaged with odoo since May - 2012.

* Customise existing module or develop new module base on customer requirement.

* Played key developer role in many past and running projects.

* Expert in requirement gathering of business and transforming requirement into odoo platform.

* Major expertise in core modules, database, report development and theme development.

* Integration expert.

Linkedin  : https://in.linkedin.com/in/anil-kesariya-97b20a66

Anil R. Kesariya
On 10/24/13, 3:31 AM

These are the some sort of possibility when ,No such external ID Error raised

1) If used XML ID is defined in any other module and there is no dependency given to the module where it being used than this error will raise.

2) If used XML ID is in the same module and you get that error, it means the reference of the ID is being used before the file of that XML ID record is loaded,

Please check the sequence in __openerp__.py file for this, update the sequence accordingly.

 3) Either that XML ID not being defined anywhere and you are trying to use it.


Anil kesariya

in version 7 there is no menu id named as menu_address_book you can check it out

Abhishek H Menon
on 10/24/13, 3:42 AM

Brett Lehrer

--Brett Lehrer--

| 5 5 8
Milwaukee, United States
--Brett Lehrer--
Director of IT and open source enthusiast.
Brett Lehrer
On 10/24/13, 2:32 AM

base.menu_address_book is a XML ID. Those are used to refer to records that are imported (it's stored in the ir_model_data table). The reason for that is because when you want to upgrade or update a module, it needs to find the old records it created, and since you won't know in advance what the value of the ID in the table itself will be, you need a separate table mapping XML IDs to the module, table, and table's ID of the actual record that was created.

I believe that XML ID was removed for v7.0. The module you're trying to install, acy_partner_vehicle, doesn't seem to have been updated completely. Since it's only happening a few lines into the XML file, I'm guessing there are more errors in that module that need fixing as well. Why not install the 'fleet' module?

FYI if you'd like to find the XML IDs of your existing menu items so you can modify the code to get that module to install (hopefully), go into debug mode by adding ?debug to the end of your base URL (e.g.: http://my.erp.local:8069/?debug). Enter the settings page, then expand the user interface menu and open menu items. Just search for the name of the menu item you want the XML ID of and open the record. In the debug menu at the top left of the window, go to 'View Log' in the debug dropdown. It will list the full XML ID of the record you're on, if one exists. This works for any form view of a record you're on.

hi Brett Lehrer. Thanks for the reply. My problem is to need a module for managing the insurance of vechile. so thats why i take this module , In fleet module this is not possible.

on 10/24/13, 2:44 AM

Either that module needs to be updated to work properly on version 7, or the fleet module needs to be expanded to manage insurance. Updating acy_partner_vehicle would be easier to do for that situation, I'd expect. Actually just checked the community app list, that module is designed for v6.0: https://www.openerp.com/apps/6.0/acy_partner_vehicle/. Looking at the code, I don't see any indication that it actually manages insurance in any way.

Brett Lehrer
on 10/24/13, 2:51 AM
Abhishek H Menon
On 10/24/13, 3:24 AM

In v7 there is no menu id named menu_address_book. but in v6 it is in base/res/partner/partner_view.xml. Please check it out.Please use parent id as menu_config_address_book.

Hi Abhishek.... menu_config_address_book is added .. ValueError: No such external ID currently defined in the system: acy_partner_vehicle.menu_config_address_book

on 10/24/13, 4:17 AM

no not like that. base.menu_config_address_book is correct. put a statement in your menu statement in your menu tag as parent_id="base.menu_config_address_book" you will get your corresponding menu under the Address Book which is defined in base module. That is what i told till now. Instead of that you' were searching for an id which is not in v7

Abhishek H Menon
on 10/24/13, 4:22 AM

hello Abhishek "acy_partner_vehicle. base.menu_config_address_book is correct." This was the error while i tried to install this module.

on 10/24/13, 4:28 AM

is there any module available for the management of insurance of vehicle.

on 10/24/13, 4:29 AM

I don't believe so. I'd suggest installing fleet and adding customizations to include insurance tracking.

Brett Lehrer
on 10/24/13, 4:53 AM

i just told you a general case. If it is in your module then you have to specify as above. Thanks

Abhishek H Menon
on 10/24/13, 5:22 AM

I just told you the general case. If it is defined inside your module acy_partner_vehicle you have to specify the id as you told. I think in present there is no modue available that manages the insurance of vehicle. For that you have to create your own module and do the necessary cusomizations as per your requirements. Thanks charlesraj.

Abhishek H Menon
on 10/24/13, 5:24 AM

hello @ Brett Lehrer... How should i customize the fleet module, Shall i edit the python code and xml file for the fleet module or customization through the view part..

on 10/24/13, 6:15 AM

Ideally the way to make lasting changes is to make an entirely new module that depends on fleet, then inherit it and add in your changes there. No matter what happens to your database, you'll always have the module of the changes that you can apply. Making changes through the web view itself will definitely work, but those changes will only ever exist in one database. You'd have to be customizing your production database. You can also write python and XML changes directly into the fleet module, but that has drawbacks as well (updating the core source code for that module gets much tougher).

Brett Lehrer
on 10/24/13, 10:45 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/23/13, 8:06 AM
Seen: 9122 times
Last updated: 11/24/16, 1:17 AM