OpenERP中产品录入时无法导入
-
OpenERP中产品录入时采用Export到CSV格式,通过excel把剩余的内容添加进去后,发现无法导入,报错信息如下:
Traceback (most recent call last):
File "netsvc.pyo", line 244, in dispatch
File "netsvc.pyo", line 73, in call
File "serviceweb_services.pyo", line 583, in execute
File "osvosv.pyo", line 59, in wrapper
File "osvosv.pyo", line 118, in execute
File "osvosv.pyo", line 110, in execute_cr
File "osvorm.pyo", line 806, in import_data
File "osvorm.pyo", line 699, in process_liness
ValueError: invalid literal for float(): OAN0001R -
如果你有比较好用的XML编辑器,可以参照 addons/mrp目录下的mrp_demo.xml,将BOM数据制作成XML文件,修改mrp模块下的__terp__.py文件
'init_xml': ['bom_data.xml',]
然后在启动openerp服务器时初始化mrp模块,使你的bom_data能导入系统:
openerp-server.py -dDB_NAME -umrp
更好的方法是将其制作成模块,请参考: blog.shine-it.net/openerp/%E5%A6%82%E4%BD%95%E5%AF%BC%E5%85%A5%E6%95%B0%E6%8D%AE%E5%88%B0open-erp