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" /> <br /><br /> 改成<br /><br /><field ref="chart1012" name="parent_id" /> <br /><br /><br />还有很多很多<br /><br />继续折腾,祝你好运!



  • 谢谢



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



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



  • 报错信息如下:<br />OpenERP Server Error<br /><br />Client Traceback (most recent call last):<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 180, in dispatch<br />    response["result"] = method(controller, self, **self.params)<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1052, in call_button<br />    action = self.call_common(req, model, method, args, domain_id, context_id)<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 996, in call_common<br />    return self._call_kw(req, model, method, args, {})<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1010, in _call_kw<br />    return getattr(req.session.model(model), method)(*args, **kwargs)<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/openerplib/main.py", line 250, in proxy<br />    args, kw)<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/openerplib/main.py", line 117, in proxy<br />    result = self.connector.send(self.service_name, method, *args)<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 608, in send<br />    raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)<br /><br /><br />Server Traceback (most recent call last):<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 593, in send<br />    return openerp.netsvc.dispatch_rpc(service_name, method, args)<br />  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 360, in dispatch_rpc<br />    result = ExportService.getService(service_name).dispatch(method, params)<br />  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 586, in dispatch<br />    res = fn(db, uid, *params)<br />  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 167, in execute_kw<br />    return self.execute(db, uid, obj, method, *args, **kw or {})<br />  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 121, in wrapper<br />    return f(self, dbname, *args, **kwargs)<br />  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 176, in execute<br />    res = self.execute_cr(cr, uid, obj, method, *args, **kw)<br />  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 164, in execute_cr<br />    return getattr(object, method)(cr, uid, *args, **kw)<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_config.py", line 120, in action_next<br />    next = self.execute(cr, uid, ids, context=context)<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/account/installer.py", line 119, in execute<br />    super(account_installer, self).execute(cr, uid, ids, context=context)<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_config.py", line 360, in execute<br />    new_db, self.pool = pooler.restart_pool(cr.dbname, update_module=True)<br />  File "/usr/lib/pymodules/python2.7/openerp/pooler.py", line 39, in restart_pool<br />    registry = RegistryManager.new(db_name, force_demo, status, update_module, True)<br />  File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 202, in new<br />    openerp.modules.load_modules(registry.db, force_demo, status, update_module)<br />  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 338, in load_modules<br />    processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules)<br />  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 253, in load_marked_modules<br />    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules)<br />  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 192, in load_module_graph<br />    load_update_xml(module_name, idref, mode)<br />  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 90, in <lambda><br />    load_update_xml = lambda *args: _load_data(cr, *args, kind='update_xml')<br />  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 138, in _load_data<br />    tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)<br />  File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 997, in convert_xml_import<br />    obj.parse(doc.getroot())<br />  File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 890, in parse<br />    self._tags[rec.tag](self.cr, rec, n)<br />  File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 848, in _tag_record<br />    f_val = self.id_get(cr, f_ref)<br />  File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 867, in id_get<br />    res = self.model_id_get(cr, id_str)<br />  File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 876, in model_id_get<br />    return model_data_obj.get_object_reference(cr, self.uid, mod, id_str)<br />  File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 18, in lookup<br />    r = self.lookup(self2, cr, *args)<br />  File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 46, in lookup<br />    value = d[key] = self.method(self2, cr, *args)<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 654, in get_object_reference<br />    data_id = self._get_id(cr, uid, module, xml_id)<br />  File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 18, in lookup<br />    r = self.lookup(self2, cr, *args)<br />  File "/usr/lib/pymodules/python2.7/openerp/tools/cache.py", line 46, in lookup<br />    value = d[key] = self.method(self2, cr, *args)<br />  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 647, in _get_id<br />    raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id))<br />ValueError: No such external ID currently defined in the system: l10n_cn.parent_id<br />


  • 管理员

    [quote]raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id))<br />ValueError: No such external ID currently defined in the system: l10n_cn.parent_id[/quote]<br />这里的意思是你的parent_id定义错误了,定义了一个不存在的ID,如同上面jeff说的问题。<br />建议可以先学学开发http://openerp-china.org/index.php?page=developer<br />或者直接在界面修改科目。


登录后回复
 

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