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

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

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

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

今天去官方的apps上看了下,发现Merge Duplicate Products这个模块,不过目前的版本在我的OE里面安装会报错




  • 报错内容如下:


    Client Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch
        response["result"] = method(self, **self.params)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1132, in call_button
        action = self._call_kw(req, model, method, args, {})
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
        return getattr(req.session.model(model), method)(*args, **kwargs)
      File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 30, in proxy_method
        result = self.session.send(self.service_name, method, *args)
      File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send
        return openerp.netsvc.dispatch_rpc(service_name, method, args)
      File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 292, in dispatch_rpc
        result = ExportService.getService(service_name).dispatch(method, params)
      File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch
        res = fn(db, uid, *params)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 188, in execute_kw
        return self.execute(db, uid, obj, method, *args, **kw or {})
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 131, in wrapper
        return f(self, dbname, *args, **kwargs)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 197, in execute
        res = self.execute_cr(cr, uid, obj, method, *args, **kw)
      File "/usr/lib/pymodules/python2.7/openerp/addons/audittrail/audittrail.py", line 514, in execute_cr
        return fct_src(cr, uid, model, method, *args, **kw)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 185, in execute_cr
        return getattr(object, method)(cr, uid, *args, **kw)
      File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/addons/base/module/module.py", line 475, in _button_immediate_function
        _, pool = pooler.restart_pool(cr.dbname, update_module=True)
      File "/usr/lib/pymodules/python2.7/openerp/pooler.py", line 39, in restart_pool
        registry = RegistryManager.new(db_name, force_demo, status, update_module)
      File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 218, in new
        openerp.modules.load_modules(registry.db, force_demo, status, update_module)
      File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 354, in load_modules
        loaded_modules, update_module)
      File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 188, in load_module_graph
        load_data(module_name, idref, mode)
      File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 76, in <lambda>
        load_data = lambda *args: _load_data(cr, *args, kind='data')
      File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 124, in _load_data
        tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 954, in convert_xml_import
        obj.parse(doc.getroot())
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 847, in parse
        self._tags[rec.tag](self.cr, rec, n)
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 652, in _tag_menuitem
        group_id = self.id_get(cr, group)
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 824, in id_get
        res = self.model_id_get(cr, id_str)
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 833, in model_id_get
        return model_data_obj.get_object_reference(cr, self.uid, mod, id_str)
      File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 18, in lookup
        r = self.lookup(self2, cr, *args)
      File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 46, in lookup
        value = d[key] = self.method(self2, cr, *args)
      File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 869, in get_object_reference
        data_id = self._get_id(cr, uid, module, xml_id)
      File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 18, in lookup
        r = self.lookup(self2, cr, *args)
      File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 46, in lookup
        value = d[key] = self.method(self2, cr, *args)
      File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 862, 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: product_do_merge.res_group_product_do_merge

    先留个贴在这里,我会关注这个模块的。




  • 报错内容如下:


    Client Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch
        response["result"] = method(self, **self.params)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1132, in call_button
        action = self._call_kw(req, model, method, args, {})
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
        return getattr(req.session.model(model), method)(*args, **kwargs)
      File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 30, in proxy_method
        result = self.session.send(self.service_name, method, *args)
      File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send
        return openerp.netsvc.dispatch_rpc(service_name, method, args)
      File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 292, in dispatch_rpc
        result = ExportService.getService(service_name).dispatch(method, params)
      File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch
        res = fn(db, uid, *params)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 188, in execute_kw
        return self.execute(db, uid, obj, method, *args, **kw or {})
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 131, in wrapper
        return f(self, dbname, *args, **kwargs)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 197, in execute
        res = self.execute_cr(cr, uid, obj, method, *args, **kw)
      File "/usr/lib/pymodules/python2.7/openerp/addons/audittrail/audittrail.py", line 514, in execute_cr
        return fct_src(cr, uid, model, method, *args, **kw)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 185, in execute_cr
        return getattr(object, method)(cr, uid, *args, **kw)
      File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/addons/base/module/module.py", line 475, in _button_immediate_function
        _, pool = pooler.restart_pool(cr.dbname, update_module=True)
      File "/usr/lib/pymodules/python2.7/openerp/pooler.py", line 39, in restart_pool
        registry = RegistryManager.new(db_name, force_demo, status, update_module)
      File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 218, in new
        openerp.modules.load_modules(registry.db, force_demo, status, update_module)
      File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 354, in load_modules
        loaded_modules, update_module)
      File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 188, in load_module_graph
        load_data(module_name, idref, mode)
      File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 76, in <lambda>
        load_data = lambda *args: _load_data(cr, *args, kind='data')
      File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 124, in _load_data
        tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 954, in convert_xml_import
        obj.parse(doc.getroot())
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 847, in parse
        self._tags[rec.tag](self.cr, rec, n)
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 652, in _tag_menuitem
        group_id = self.id_get(cr, group)
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 824, in id_get
        res = self.model_id_get(cr, id_str)
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 833, in model_id_get
        return model_data_obj.get_object_reference(cr, self.uid, mod, id_str)
      File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 18, in lookup
        r = self.lookup(self2, cr, *args)
      File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 46, in lookup
        value = d[key] = self.method(self2, cr, *args)
      File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 869, in get_object_reference
        data_id = self._get_id(cr, uid, module, xml_id)
      File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 18, in lookup
        r = self.lookup(self2, cr, *args)
      File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 46, in lookup
        value = d[key] = self.method(self2, cr, *args)
      File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 862, 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: product_do_merge.res_group_product_do_merge

    先留个贴在这里,我会关注这个模块的。



  • 你在addons 里检查一下, 是否有  product_do_merge 这个模块. 如果没有, 还需要依赖于这个名称的模块的.



  • 感谢mrshelly 
    https://www.openerp.com/apps/7.0/product_do_merge/
    我发现product_do_merge就是Merge Duplicate Products ,就是安装这个模块的时候报错的。。。


  • 管理员

    在这个模块中搜一下“res_group_product_do_merge”字串,可能是没有定义,或写错了xml-id



  • product_do_merge/security/res_groups.xml

    第四行 改为
            <record id="res_group_product_do_merge" model="res.groups">





  • 谢谢校长,谢谢jeff,今天发奋图强继续研究oe和整理之前的笔记(万恶的evernote 把本来的笔记丢到垃圾桶了,捡回来后发现需要好好整理下)
    发现了 jeff和校长的解决方案,明天继续实施 这个模块



  • Merge Duplicate Products
    这个模块好像修复了,我又下载了一次,能顺利安装了

    在用户 权限 这里 有个 勾,勾选一下,
    仓库  这里就出现了 tools duplicate products 这个选项了,
    见图



  • 这个模块有啥作用?



  • 贴段英文介绍:
    Merge Products
    We can merge duplicates products and set the new id in all documents of product merged.

    We can merge products using like mach parameter these fields:
    Name
    Reference
    We can select which product will be the main product.

    This feature do not change anything if the products to be merged have operations in different units of measure.

    This feature is in the follow path Warehouse/Tools/Duplicate products also is created an action menu in the product view.

    不过我测试了下,好像没法合并 重名产品的,我估计产品 如果有 其他单据关联就不能合并,所以 估计也没啥大用。


登录后回复
 

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