This question has been flagged
3 Replies
4280 Views

 <field name="search_matches" nolabel="1" widget="many2many_list" context="{'new_id':id}">
                                 <tree version="7.0" editable="bottom">
                                     <field name="user_id"/>
                                     <field name="stock_type"/>
                                     <field name="structure_building"/>
                                     <field name="property_vaastu"/>
                                     <button string="Schedule/Log Call"
                                name="%(opportunity2phonecall_act)d"
                                type="action"/>
                                 </tree>
                            </field>        
        when i click the button the context value is not passed to the wizard               

Avatar
Discard
Best Answer

Use active_id instead id

Avatar
Discard
Best Answer

Hi

Try this code

 

                            <field name="search_matches" nolabel="1" widget="many2many_list">
                                 <tree version="7.0" editable="bottom">
                                     <field name="user_id"/>
                                     <field name="stock_type"/>
                                     <field name="structure_building"/>
                                     <field name="property_vaastu"/>
                                     <button name="%(opportunity2phonecall_act)d"  type="action"  string="Schedule/Log Call" context="{'new_id': active_id}"/>
                                 </tree>
                            </field>    

 

Avatar
Discard
Author Best Answer

Thank you people,

The error was in my .py code

Avatar
Discard