Comment 3 for bug 929359

Revision history for this message
Willow IT's Code Repository Admin (code-repository) wrote :

Thankyou for that. I have put the tooltip on the same button as you, and it worked as per the video.

The place where it does not work in my module is different from your example.

Your example has a button:
    <button colspan="1" name="%(action_view_sale_order_line_make_invoice)d" states="confirmed" string="Make Invoices" help="Richard" type="action" icon="terp-document-new"/>

which differs little from ours:

    <button name="%(action_w_config_launch_config)d" string="Configurator..."
        icon="gtk-properties" type="action" colspan="1"
        context="{'configurator_type': 'so'}"
        attrs="{'readonly': ['|', '|', ('id', '&lt;=', 0), ('has_configuration', '=', False), ('state', '!=', 'draft')]}"
        help="Edit Configurator choices"/>

The difference is the action in the sample code calls an action of type "ir.actions.act_window"
        <record id="action_view_sale_order_line_make_invoice" model="ir.actions.act_window">
            <field name="name">Make Invoices</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">sale.order.line.make.invoice</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="view_id" ref="view_sale_order_line_make_invoice"/>
            <field name="target">new</field>
        </record>

Our code is calling an action of type "ir.actions.server"
        <record id="action_w_config_launch_config" model="ir.actions.server">
            <field name="code">
# Call method action_config on the sales order line object, passing the context from the form.
# The method returns the window action definition to open whichever is the appropriate
# configurator wizard.
action = self.action_config(cr, uid, [], context=context)
</field>
            <field eval="5" name="sequence"/>
            <field name="state">code</field>
            <field name="type">ir.actions.server</field>
            <field name="model_id" ref="model_w_config_choices_wiz"/>
            <field name="condition">True</field>
            <field name="name">action_w_config_launch_config</field>
        </record>

I hope this helps direct you.

Thankyou,

Richard