抛出错误
AttributeError: 'module' object has no attribute 'external_osv'
原因
product_links 继承了 base_external_referentials模块的 external_osv类。
base_external_referentials模块6.0版,有一个external_osv类
class external_osv(osv.osv):
pass #FIXME remove! only here for compatibility purpose for now
但安装是6.1版,已经去掉了这个类
解决方案
修改product_links.py文件。
原代码(部分)
from osv import fields, osv
from base_external_referentials import external_osv
class product_link(external_osv.external_osv):
_name = 'product.link'
_rec_name = 'linked_product_id'
修改成
from osv import fields, osv
#from base_external_referentials import external_osv
#class product_link(external_osv.external_osv):
class product_link(osv.osv):
_name = 'product.link'
_rec_name = 'linked_product_id'