今天去官方的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
先留个贴在这里,我会关注这个模块的。 -
感谢mrshelly <br / https://www.openerp.com/apps/7.0/product_do_merge/ br />我发现product_do_merge就是Merge Duplicate Products ,就是安装这个模块的时候报错的。。。
-
在这个模块中搜一下“res_group_product_do_merge”字串,可能是没有定义,或写错了xml-id
-
-
贴段英文介绍:
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.
不过我测试了下,好像没法合并 重名产品的,我估计产品 如果有 其他单据关联就不能合并,所以 估计也没啥大用。