On Mon 2011-10-17 00:58, Cédric Krier wrote:
> On 16/10/11 16:33 -0600, Tom Schutter wrote:
> > But I can't see how to actually attach the report to the UI.  I suspect
> > that the empty "Report API" and "Python API" sections of the Reports doc
> > would tell me what I need to know if well, they were not empty.
> > 
> > Examining other reports doesn't shed enough light.  Sometimes there
> > appear to be report-related objects in the Python source such as
> > PickingList in stock/shipment.py, but I can't decypher the why and the
> > how.
> > 
> > I have the skills, but I am lacking the knowledge of Tryton internals.
> 
> You must create a record "ir.action.report" like in
> 
>     http://hg.tryton.org/2.0/modules/party/file/0795dfec273a/party.xml#l146

I have this in price_list.xml:

        <record model="ir.action.report" id="report_price_list">
            <field name="name">Price List</field>
            <field name="model">product.price_list</field>
            <field name="report_name">product.price_list</field>
            <field name="report">product_price_list/price_list.odt</field>
            <field name="style">company/header_A4.odt</field>
        </record>
        <record model="ir.action.keyword" id="report_price_list_keyword">
            <field name="keyword">form_print</field>
            <field name="model">product.price_list,0</field>
            <field name="action" ref="report_price_list"/>
        </record>

-- 
Tom Schutter
[email protected]

-- 
[email protected] mailing list

Reply via email to