-1
请使用rml在OpenERP中创建一个新报告。 因此,我在我的rml中使用此代码为每个结果创建一个新的td,但问题是我得到异常:'NoneType'对象没有属性'标记'作为错误。 这里是我的代码:例外:'NoneType'对象没有'tag'属性
<tr>
<para style="P7">[[ repeatIn(get_employee_lines(), 'o', 'td') ]]</para>
<td>
<para style="P9">NOM EMPLOYÉ</para>
</td>
<td>
<para style="P7">[[ o['name'] ]]</para>
</td>
</tr>
所以,请谁可以帮我找到解决真正需要帮助的。 这里是所有的错误:
2015-09-01 10:21:45,562 6030 ERROR openerp openerp.service.web_services: Exception: 'NoneType' object has no attribute 'tag'
Traceback (most recent call last):
File "/opt/openerp/v7/server/openerp/service/web_services.py", line 712, in go
(result, format) = obj.create(cr, uid, ids, datas, context)
File "/opt/openerp/v7/server/openerp/report/report_sxw.py", line 443, in create
fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
File "/opt/openerp/v7/server/openerp/report/report_sxw.py", line 512, in create_source_pdf
return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
File "/opt/openerp/v7/server/openerp/report/report_sxw.py", line 530, in create_single_pdf
processed_rml = self.preprocess_rml(processed_rml,report_xml.report_type)
File "/opt/openerp/v7/server/openerp/report/preprocess.py", line 82, in preprocess_rml
self.preprocess_rml(node,type)
File "/opt/openerp/v7/server/openerp/report/preprocess.py", line 82, in preprocess_rml
self.preprocess_rml(node,type)
File "/opt/openerp/v7/server/openerp/report/preprocess.py", line 82, in preprocess_rml
self.preprocess_rml(node,type)
File "/opt/openerp/v7/server/openerp/report/preprocess.py", line 77, in preprocess_rml
t = _regex1.sub(_sub1, node.text or node.tail)
File "/opt/openerp/v7/server/openerp/report/preprocess.py", line 73, in _sub1
while n.tag not in match:
AttributeError: 'NoneType' object has no attribute 'tag'
2015-09-01 10:21:45,793 6030 ERROR openerp openerp.netsvc: 'NoneType' object has no attribute 'tag'
(<type 'exceptions.AttributeError'>, AttributeError("'NoneType' object has no attribute 'tag'",), <traceback object at 0x7fdea5a5c950>)
Traceback (most recent call last):
File "/opt/openerp/v7/server/openerp/netsvc.py", line 296, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/opt/openerp/v7/server/openerp/service/web_services.py", line 654, in dispatch
res = fn(db, uid, *params)
File "/opt/openerp/v7/server/openerp/service/web_services.py", line 760, in exp_report_get
return self._check_report(report_id)
File "/opt/openerp/v7/server/openerp/service/web_services.py", line 738, in _check_report
netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)
File "/opt/openerp/v7/server/openerp/netsvc.py", line 71, in abort_response
raise openerp.osv.osv.except_osv(description, details)
except_osv: (u"'NoneType' object has no attribute 'tag'", (<type 'exceptions.AttributeError'>, AttributeError("'NoneType' object has no attribute 'tag'",), <traceback object at 0x7fdea5a5c950>))
这个问题得到回答[这里] [1] [1]:http://stackoverflow.com/questions/8949252/python-attribute-error-nonetype-object-has-no-attribute - 什么东西 – mryuso92
其同样的错误,但不是一回事。这是由于重复中的td,所以我想知道如何在rml中使用它 –
欢迎来到SO。这不是错误转储。请在此提出明确的问题。只是发布你的代码希望其他人调试它也不理解。 – Adriaan