0
我一直在尝试在OpenERP的报告模块下创建一个calldetails报告。 我希望与报告/销售点/销售详细信息中的报告相同。 我做了文档中指定的步骤,但模块没有显示。OpenERP报告创建失败
这是我报告的XML(内calldetails /报告/ calldata_report.xml)
<?xml version="1.0"?>
<openerp>
<data>
<report
id="report_calldata"
string="call details"
model="calldata"
name="report.calldata_report"
rml="calldetails/report/calldata_report.rml"
auto="False"/>
</data>
</openerp>
我的模型(内部calldetails/calldata.py)
from osv import osv,fields
class calldata(osv.osv):
_name = 'calldata'
_columns = {
'Call_start': fields.datetime('Call start'),
'Call_duration':fields.datetime('Call duration'),
'Ring_duration':fields.float('Ring duration'),
'Caller':fields.char('Caller'),
'Direction':fields.char('Direction'),
'Called_number':fields.char('Called number'),
'Dialled_number':fields.char('Dialled number'),
'Account':fields.char('Account'),
'Is_Internal':fields.boolean('Is internal'),
'Call_ID':fields.char('Call id'),
'Continuation':fields.boolean('Continuation'),
'Party1Device':fields.char('Party1device'),
'Party1Name':fields.char('Party1name'),
'Party2Device':fields.char('Party2device'),
'Party2Name':fields.char('Party2name'),
'Hold_Time':fields.float('Hold time'),
'Park_Time':fields.float('Park time'),
}
calldata()
我的报告对象的创建代码是(在calldetails/report/calldata_report.py中)
from report import report_sxw
from osv import osv
class test_parser(report_sxw.rml_parse):
def __init__(self,cr,uid,name,context):
super(test_parser, self).__init_(cr,uid,name,context=context)
self.localcontext.update({})
report_sxw.report_sxw('report.calldata_report',
'calldata',
'addons/calldetails/report/calldata_report.rml',
parser=test_parser)
而内部记录文件夹中添加ED 初始化的.py(我进口calldata_report.py)和calldata_report.rml文件中calldetails(包含代码出售/报告/销售/ sale_order.rml复制)
and in (calldetails/__.openerp__.py) I added
{"name" : "SMDR",
"version" : "1.0",
"author" : "Anuradha",
"category" : "Generic Modules",
"description": "call details",
"website":"added website here but i cant post it due to insuffient karma",
"depends" : ["base"],
"init_xml" : [],
"update_xml" : ["initial.xml","calldata_display.xml","report/calldata_report.xml"],
# "data":["calldata_report.xml"],
"installable": True,
"active": False
}
并补充报告模块/ 初始化 .py也。 请帮我找问题,我一直在努力了很长一段时间
您是否为报告创建了菜单?你有没有在创建模块后重新启动服务器! ! – Parthiv