← Back to team overview

openerp-community team mailing list archive

Re: buttons in list views

 

I don't think you can use buttons in view_type = tree. It should work in
view_type = form, and view_mode = tree.

2011/7/22 Viktor Nagy <viktor.nagy@xxxxxxxxxxx>

> Hi,
>
> I would like a view as the following:
>
>        <record id="view_mrp_change_tree" model="ir.ui.view">
>                <field name="name">mrp.bom.change.production</field>
>                <field name="model">mrp.bom</field>
>                <field name="type">tree</field>
>                <field name="arch" type="xml">
>                        <tree string="Change BoM">
>                                <field name="name" />
>                                <button name="change_bom_for_production_end"
> type="object"
> string="Select" />
>                        </tree>
>                </field>
>        </record>
>
> This is opened using a button click on an mrp.production:
>
>        <record id="mrp_bom_change_form_action"
> model="ir.actions.act_window">
>            <field name="name">Change Bill of Materials</field>
>            <field name="type">ir.actions.act_window</field>
>            <field name="res_model">mrp.bom</field>
>            <field name="view_type">tree</field>
>            <field name="view_mode">tree</field>
>            <field name="view_id" ref="view_mrp_change_tree"/>
>            <field name="target">new</field>
>        </record>
>
> Unfortunately, the button does not appear in the web client.
> Could someone tell me how to get the buttons visible? Does the view as
> shown in the web client depend on context or some ir.value?
>
> thanks
> Viktor
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help   : https://help.launchpad.net/ListHelp
>

References