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

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

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

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

用模块的方法导入关联数据报错的问题



  • 我将res.partner res.partner.address res.partner.contact都导进去了,在导res.partner.job时报错了。
    res.partner.job数据:
    [code]id,contact_id:id,address_id:id,state,sequence_partner,sequence_contact,
    partner_job77,contact_104,address_144,current,0,0[/code]

    报错信息
    [code]Environment Information :
    System : Linux-2.6.38-8-generic-i686-with-Ubuntu-11.04-natty
    OS Name : posix
    Distributor ID: Ubuntu
    Description: Ubuntu 11.04
    Release: 11.04
    Codename: natty
    Operating System Release : 2.6.38-8-generic
    Operating System Version : #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011
    Operating System Architecture : 32bit
    Operating System Locale : zh_CN.UTF8
    Python Version : 2.7.1+
    OpenERP-Client Version : 6.0.2
    Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
      File "/home/pengyong/workspace/openerp-server602/bin/netsvc.py", line 489, in dispatch
        result = ExportService.getService(service_name).dispatch(method, auth, params)
      File "/home/pengyong/workspace/openerp-server602/bin/service/web_services.py", line 596, in dispatch
        security.check(db,uid,passwd)
      File "/home/pengyong/workspace/openerp-server602/bin/service/security.py", line 43, in check
        pool = pooler.get_pool(db)
      File "/home/pengyong/workspace/openerp-server602/bin/pooler.py", line 79, in get_pool
        pool = get_db_and_pool(db_name, force_demo, status, update_module)[1]
      File "/home/pengyong/workspace/openerp-server602/bin/pooler.py", line 39, in get_db_and_pool
        addons.load_modules(db, force_demo, status, update_module)
      File "/home/pengyong/workspace/openerp-server602/bin/addons/init.py", line 883, in load_modules
        processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
      File "/home/pengyong/workspace/openerp-server602/bin/addons/init.py", line 748, in load_module_graph
        load_init_update_xml(cr, m, idref, mode, kind)
      File "/home/pengyong/workspace/openerp-server602/bin/addons/init.py", line 635, in load_init_update_xml
        tools.convert_csv_import(cr, m, os.path.basename(filename), fp.read(), idref, mode=mode, noupdate=noupdate)
      File "/home/pengyong/workspace/openerp-server602/bin/tools/convert.py", line 947, in convert_csv_import
        result, rows, warning_msg, dummy = pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial)
      File "/home/pengyong/workspace/openerp-server602/bin/osv/orm.py", line 868, in import_data
        process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
      File "/home/pengyong/workspace/openerp-server602/bin/osv/orm.py", line 818, in process_liness
        res = _get_id(relation, line[i], current_module, mode)
      File "/home/pengyong/workspace/openerp-server602/bin/osv/orm.py", line 732, in _get_id
        record_id = ir_model_data_obj._get_id(cr, uid, module, xml_id)
      File "/home/pengyong/workspace/openerp-server602/bin/tools/misc.py", line 823, in cached_result
        result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
      File "/home/pengyong/workspace/openerp-server602/bin/addons/base/ir/ir_model.py", line 602, in _get_id
        raise ValueError('No references to %s.%s' % (module, xml_id))
    ValueError: No references to 208_20110622_partner.contact_104,address_144
    [/code]



  • 我将res.partner res.partner.address res.partner.contact都导进去了,在导res.partner.job时报错了。
    res.partner.job数据:
    [code]id,contact_id:id,address_id:id,state,sequence_partner,sequence_contact,
    partner_job77,contact_104,address_144,current,0,0[/code]

    报错信息
    [code]Environment Information :
    System : Linux-2.6.38-8-generic-i686-with-Ubuntu-11.04-natty
    OS Name : posix
    Distributor ID: Ubuntu
    Description: Ubuntu 11.04
    Release: 11.04
    Codename: natty
    Operating System Release : 2.6.38-8-generic
    Operating System Version : #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011
    Operating System Architecture : 32bit
    Operating System Locale : zh_CN.UTF8
    Python Version : 2.7.1+
    OpenERP-Client Version : 6.0.2
    Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
      File "/home/pengyong/workspace/openerp-server602/bin/netsvc.py", line 489, in dispatch
        result = ExportService.getService(service_name).dispatch(method, auth, params)
      File "/home/pengyong/workspace/openerp-server602/bin/service/web_services.py", line 596, in dispatch
        security.check(db,uid,passwd)
      File "/home/pengyong/workspace/openerp-server602/bin/service/security.py", line 43, in check
        pool = pooler.get_pool(db)
      File "/home/pengyong/workspace/openerp-server602/bin/pooler.py", line 79, in get_pool
        pool = get_db_and_pool(db_name, force_demo, status, update_module)[1]
      File "/home/pengyong/workspace/openerp-server602/bin/pooler.py", line 39, in get_db_and_pool
        addons.load_modules(db, force_demo, status, update_module)
      File "/home/pengyong/workspace/openerp-server602/bin/addons/init.py", line 883, in load_modules
        processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
      File "/home/pengyong/workspace/openerp-server602/bin/addons/init.py", line 748, in load_module_graph
        load_init_update_xml(cr, m, idref, mode, kind)
      File "/home/pengyong/workspace/openerp-server602/bin/addons/init.py", line 635, in load_init_update_xml
        tools.convert_csv_import(cr, m, os.path.basename(filename), fp.read(), idref, mode=mode, noupdate=noupdate)
      File "/home/pengyong/workspace/openerp-server602/bin/tools/convert.py", line 947, in convert_csv_import
        result, rows, warning_msg, dummy = pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial)
      File "/home/pengyong/workspace/openerp-server602/bin/osv/orm.py", line 868, in import_data
        process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
      File "/home/pengyong/workspace/openerp-server602/bin/osv/orm.py", line 818, in process_liness
        res = _get_id(relation, line[i], current_module, mode)
      File "/home/pengyong/workspace/openerp-server602/bin/osv/orm.py", line 732, in _get_id
        record_id = ir_model_data_obj._get_id(cr, uid, module, xml_id)
      File "/home/pengyong/workspace/openerp-server602/bin/tools/misc.py", line 823, in cached_result
        result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
      File "/home/pengyong/workspace/openerp-server602/bin/addons/base/ir/ir_model.py", line 602, in _get_id
        raise ValueError('No references to %s.%s' % (module, xml_id))
    ValueError: No references to 208_20110622_partner.contact_104,address_144
    [/code]



  • 推荐用 xml 的数据来导入 关联性很强的数据组...

    具体可以参阅 addons 里面 茫茫多的 _data.xml 文件..


登录后回复
 

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