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

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

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

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

求助,我修改l10n_cn内的account_chart.xml,报错:l10n_cn.parent_id



  • 我修改了l10n_cn内的account_chart.xml,在其中添加了一些科目,在安装财务模块时报错。报错信息为:No such external ID currently defined in the system:l10n_cn.parent_id。不知道是否还需要修改那些地方。



  • 我修改了l10n_cn内的account_chart.xml,在其中添加了一些科目,在安装财务模块时报错。报错信息为:No such external ID currently defined in the system:l10n_cn.parent_id。不知道是否还需要修改那些地方。



  • 乱改可不行


  • 管理员

    @pop321 建议把你的代码发出来



  • 模块内其他部分没有修改。



  • <field ref="parent_id" name="chart1012" />

    改成

    <field ref="chart1012" name="parent_id" />


    还有很多很多

    继续折腾,祝你好运!



  • 谢谢



  • 系统自带的l10n_cn里面是这样写的:
    <record id="chart2221" model="account.account.template">
    <field name="code">2221</field>
    <field eval="False" name="reconcile"/>
                <field ref="cn_root" name="parent_id"/>
    <field name="type">view</field>
    <field name="name">应交税费</field>
    <field name="user_type" ref="user_type_debt"/>
    </record>
    <record id="chart222101" model="account.account.template">
    <field name="code">222101</field>
    <field eval="False" name="reconcile"/>
    <field name="parent_id" ref="chart2221"/>
    <field name="type">view</field>
    <field name="name">应交增值税</field>
    <field name="user_type" ref="user_type_debt"/>
    </record>
    <record id="chart22210101" model="account.account.template">
    <field name="code">22210101</field>
    <field eval="False" name="reconcile"/>
    <field name="parent_id" ref="chart222101"/>
    <field name="type">other</field>
    <field name="name">进项税额</field>
    <field name="user_type" ref="user_type_debt"/>
    </record>
    却可以通过,不知道是什么原因?



  • 可以,是因为那样写是对的。



  • 报错信息如下:
    OpenERP Server Error

    Client Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 180, in dispatch
        response["result"] = method(controller, self, **self.params)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1052, in call_button
        action = self.call_common(req, model, method, args, domain_id, context_id)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 996, in call_common
        return self._call_kw(req, model, method, args, {})
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1010, in _call_kw
        return getattr(req.session.model(model), method)(*args, **kwargs)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/openerplib/main.py", line 250, in proxy
        args, kw)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/openerplib/main.py", line 117, in proxy
        result = self.connector.send(self.service_name, method, *args)
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 608, in send
        raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)


    Server Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 593, in send
        return openerp.netsvc.dispatch_rpc(service_name, method, args)
      File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 360, in dispatch_rpc
        result = ExportService.getService(service_name).dispatch(method, params)
      File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 586, in dispatch
        res = fn(db, uid, *params)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 167, in execute_kw
        return self.execute(db, uid, obj, method, *args, **kw or {})
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 121, in wrapper
        return f(self, dbname, *args, **kwargs)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 176, in execute
        res = self.execute_cr(cr, uid, obj, method, *args, **kw)
      File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 164, in execute_cr
        return getattr(object, method)(cr, uid, *args, **kw)
      File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_config.py", line 120, in action_next
        next = self.execute(cr, uid, ids, context=context)
      File "/usr/lib/pymodules/python2.7/openerp/addons/account/installer.py", line 119, in execute
        super(account_installer, self).execute(cr, uid, ids, context=context)
      File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_config.py", line 360, in execute
        new_db, self.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, True)
      File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 202, in new
        openerp.modules.load_modules(registry.db, force_demo, status, update_module)
      File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 338, in load_modules
        processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules)
      File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 253, in load_marked_modules
        loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules)
      File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 192, in load_module_graph
        load_update_xml(module_name, idref, mode)
      File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 90, in <lambda>
        load_update_xml = lambda *args: _load_data(cr, *args, kind='update_xml')
      File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 138, 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 997, in convert_xml_import
        obj.parse(doc.getroot())
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 890, in parse
        self._tags[rec.tag](self.cr, rec, n)
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 848, in _tag_record
        f_val = self.id_get(cr, f_ref)
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 867, in id_get
        res = self.model_id_get(cr, id_str)
      File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 876, 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 654, 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 647, 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: l10n_cn.parent_id


  • 管理员

    [quote]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: l10n_cn.parent_id[/quote]
    这里的意思是你的parent_id定义错误了,定义了一个不存在的ID,如同上面jeff说的问题。
    建议可以先学学开发http://openerp-china.org/index.php?page=developer
    或者直接在界面修改科目。


登录后回复
 

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