Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Report menu not comes

By
Anuradha
on 8/1/13, 6:41 AM 1,810 views
I want to add a report under report menu. i added xml file for report in my module and added its name in update_xml
list.
 my xml is
<?xml version="1.0"?>
<openerp>
    <data>
    <report id="calldata_print"
            string="Call details"
            model="calldata"
            name="calldata.print"
            rml="calldata_report.rml"
            menu="True"
            auto="False"/>
     </data>
</openerp>
but its not coming in menu.Please help?
0
Amit Parik (amp)
On 8/2/13, 6:54 AM

Hello,

menu="True" not required parameter any more. But I think you might have mistake on model name. model is object name where you want to show this report like if you create report for res.partner object then model name must be 'res.partner'.

Under the name parameter you have to pass the report object name, for example if my report object is report.amp.test then name would be amp.test.

Thank you!

0
Anuradha
On 8/2/13, 7:39 AM
    Thanks Amit.
        i changed the code but still the menu not comes 
            This is my xml for report(inside calldetails/report/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>

    My model is (inside 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()

    My report object creation code is (inside 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 )
 And inside record folder i added  __init__.py (i imported calldata_report.py) and calldata_report.rml file( contains code copied from sale/report/sale/ 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
    }
    and added report module in calldetails/__init__.py also .

    Please help me to find issue i have been working on it for a long time

<report id="report_calldata" string="call details" model="calldata" name="calldata_report" rml="calldetails/report/calldata_report.rml" auto="False"/> name shoud be like this name="calldata_report"

Amit Parik (amp)
on 8/2/13, 8:38 AM

Tried that also but still menu not showing

Anuradha
on 8/2/13, 8:45 AM

I want report in the same way as in Reporting/Point of sale/sales details

Anuradha
on 8/2/13, 9:05 AM

Hi.My report comes under Settings/Technical/Actions/Reports :). ,but not comes under Reporting menu.why its not coming under "Reporting" menu?

Anuradha
on 8/3/13, 2:43 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 8/1/13, 6:41 AM
Seen: 1810 times
Last updated: 3/16/15, 8:10 AM