Odoo中文社区可以通过以下三个域名访问:shine-it.net , odoocn.org,odoo.net.cn

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

ValueError: No such external ID currently defined in the system 求解决方案。



  • OpenERP Server Error<br />Client Traceback (most recent call last):<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/http.py", line 204, in dispatch<br />    response["result"] = method(self, **self.params)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/controllers/main.py", line 1133, in call_button<br />    action = self._call_kw(req, model, method, args, {})<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/controllers/main.py", line 1121, in _call_kw<br />    return getattr(req.session.model(model), method)(*args, **kwargs)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/session.py", line 43, in proxy<br />    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/session.py", line 31, in proxy_method<br />    result = self.session.send(self.service_name, method, *args)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/session.py", line 104, in send<br />    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)<br /><br /><br />Server Traceback (most recent call last):<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/session.py", line 90, in send<br />    return openerp.netsvc.dispatch_rpc(service_name, method, args)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/netsvc.py", line 293, in dispatch_rpc<br />    result = ExportService.getService(service_name).dispatch(method, params)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/service/web_services.py", line 626, in dispatch<br />    res = fn(db, uid, *params)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/osv/osv.py", line 188, in execute_kw<br />    return self.execute(db, uid, obj, method, *args, **kw or {})<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/osv/osv.py", line 131, in wrapper<br />    return f(self, dbname, *args, **kwargs)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/osv/osv.py", line 197, in execute<br />    res = self.execute_cr(cr, uid, obj, method, *args, **kw)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/osv/osv.py", line 185, in execute_cr<br />    return getattr(object, method)(cr, uid, *args, **kw)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/magento_integration-develop/wizard/import_websites.py", line 91, in import_websites<br />    return self.open_websites(cursor, user, ids, instance, context)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/magento_integration-develop/wizard/import_websites.py", line 107, in open_websites<br />    cursor, user, 'magento_integration', 'instance_website_tree_view'<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/tools/cache.py", line 18, in lookup<br />    r = self.lookup(self2, cr, *args)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/tools/cache.py", line 46, in lookup<br />    value = d[key] = self.method(self2, cr, *args)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/base/ir/ir_model.py", line 868, in get_object_reference<br />    data_id = self._get_id(cr, uid, module, xml_id)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/tools/cache.py", line 18, in lookup<br />    r = self.lookup(self2, cr, *args)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/tools/cache.py", line 46, in lookup<br />    value = d[key] = self.method(self2, cr, *args)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/base/ir/ir_model.py", line 861, in _get_id<br />    raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id))<br />ValueError: No such external ID currently defined in the system: magento_integration.instance_website_tree_view



  • OpenERP Server Error<br />Client Traceback (most recent call last):<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/http.py", line 204, in dispatch<br />    response["result"] = method(self, **self.params)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/controllers/main.py", line 1133, in call_button<br />    action = self._call_kw(req, model, method, args, {})<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/controllers/main.py", line 1121, in _call_kw<br />    return getattr(req.session.model(model), method)(*args, **kwargs)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/session.py", line 43, in proxy<br />    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/session.py", line 31, in proxy_method<br />    result = self.session.send(self.service_name, method, *args)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/session.py", line 104, in send<br />    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)<br /><br /><br />Server Traceback (most recent call last):<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/web/session.py", line 90, in send<br />    return openerp.netsvc.dispatch_rpc(service_name, method, args)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/netsvc.py", line 293, in dispatch_rpc<br />    result = ExportService.getService(service_name).dispatch(method, params)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/service/web_services.py", line 626, in dispatch<br />    res = fn(db, uid, *params)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/osv/osv.py", line 188, in execute_kw<br />    return self.execute(db, uid, obj, method, *args, **kw or {})<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/osv/osv.py", line 131, in wrapper<br />    return f(self, dbname, *args, **kwargs)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/osv/osv.py", line 197, in execute<br />    res = self.execute_cr(cr, uid, obj, method, *args, **kw)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/osv/osv.py", line 185, in execute_cr<br />    return getattr(object, method)(cr, uid, *args, **kw)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/magento_integration-develop/wizard/import_websites.py", line 91, in import_websites<br />    return self.open_websites(cursor, user, ids, instance, context)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/magento_integration-develop/wizard/import_websites.py", line 107, in open_websites<br />    cursor, user, 'magento_integration', 'instance_website_tree_view'<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/tools/cache.py", line 18, in lookup<br />    r = self.lookup(self2, cr, *args)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/tools/cache.py", line 46, in lookup<br />    value = d[key] = self.method(self2, cr, *args)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/base/ir/ir_model.py", line 868, in get_object_reference<br />    data_id = self._get_id(cr, uid, module, xml_id)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/tools/cache.py", line 18, in lookup<br />    r = self.lookup(self2, cr, *args)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/tools/cache.py", line 46, in lookup<br />    value = d[key] = self.method(self2, cr, *args)<br />  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130501_232419-py2.6.egg/openerp/addons/base/ir/ir_model.py", line 861, in _get_id<br />    raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id))<br />ValueError: No such external ID currently defined in the system: magento_integration.instance_website_tree_view



  • 文本检索,  看看哪里定义了 : <br />instance_website_tree_view



  • -- coding: UTF-8 --<br />'''<br />    magento-integration<br /><br />    :copyright: (c) 2013 by Openlabs Technologies & Consulting (P) LTD<br />    :license: AGPLv3, see LICENSE for more details<br />'''<br />from openerp.osv import osv<br />from openerp.tools.translate import _<br /><br />from ..api import Core, OrderConfig<br /><br /><br />class ImportWebsites(osv.TransientModel):<br />    "Import websites from magentp"<br />    _name = 'magento.instance.import_websites'<br />    _description = doc<br /><br />    def import_websites(self, cursor, user, ids, context):<br />        """<br />        Import the websites and their stores/view from magento<br /><br />        :param cursor: Database cursor<br />        :param user: ID of current user<br />        :param ids: Record IDs<br />        :param context: Application context<br />        """<br />        Pool = self.pool<br /><br />        instance_obj = Pool.get('magento.instance')<br />        website_obj = Pool.get('magento.instance.website')<br />        store_obj = Pool.get('magento.website.store')<br />        store_view_obj = Pool.get('magento.store.store_view')<br />        magento_order_state_obj = Pool.get('magento.order_state')<br /><br />        instance = instance_obj.browse(<br />            cursor, user, context.get('active_id'), context<br />        )<br /><br />        context.update({<br />            'magento_instance': instance.id<br />        })<br /><br />        # Import order states<br />        with OrderConfig(<br />            instance.url, instance.api_user, instance.api_key<br />        ) as order_config_api:<br />            magento_order_state_obj.create_all_using_magento_data(<br />                cursor, user, order_config_api.get_states(), context<br />            )<br /><br />        # Import websites<br />        with Core(<br />            instance.url, instance.api_user, instance.api_key<br />        ) as core_api:<br />            website_ids = []<br />            store_ids = []<br /><br />            mag_websites = core_api.websites()<br /><br />            # Create websites<br />            for mag_website in mag_websites:<br />                website_ids.append(website_obj.find_or_create(<br />                    cursor, user, instance.id, mag_website, context<br />                ))<br /><br />            for website in website_obj.browse(<br />                    cursor, user, website_ids, context=context):<br />                mag_stores = core_api.stores(<br />                    {'website_id': {'=': website.magento_id}}<br />                )<br /><br />                # Create stores<br />                for mag_store in mag_stores:<br />                    store_ids.append(store_obj.find_or_create(<br />                        cursor, user, website.id, mag_store, context<br />                    ))<br /><br />            for store in store_obj.browse(<br />                    cursor, user, store_ids, context=context):<br />                mag_store_views = core_api.store_views(<br />                    {'group_id': {'=': store.magento_id}}<br />                )<br /><br />                # Create store views<br />                for mag_store_view in mag_store_views:<br />                    store_view_obj.find_or_create(<br />                        cursor, user, store.id, mag_store_view, context<br />                    )<br /><br />        return self.open_websites(cursor, user, ids, instance, context)<br /><br />    def open_websites(self, cursor, user, ids, instance, context):<br />        """<br />        Opens view for websites for current instance<br /><br />        :param cursor: Database cursor<br />        :param user: ID of current user<br />        :param ids: Record IDs<br />        :param instance: Browse record of magento.instance<br />        :param context: Application context<br />        :return: The websites tree view to be rendered<br />        """<br />        ir_model_data = self.pool.get('ir.model.data')<br /><br />        tree_res = ir_model_data.get_object_reference(<br />            cursor, user, 'magento_integration', [b][glow=red,2,300]'instance_website_tree_view[/glow]'[/b]<br />        )<br />        tree_id = tree_res and tree_res[1] or False<br /><br />        return {<br />            'name': _('Magento Instance Websites'),<br />            'view_type': 'form',<br />            'view_mode': 'form,tree',<br />            'res_model': 'magento.instance.website',<br />            'views': [(tree_id, 'tree')],<br />            'context': context,<br />            'type': 'ir.actions.act_window',<br />            'domain': [('instance', '=', instance.id)]<br />        }<br /><br />ImportWebsites()<br />



  • 我知道那定义了, 但是怎么改啊?


登录后回复
 

与 Odoo 中文社区 的连接断开,我们正在尝试重连,请耐心等待