This question has been flagged
1 Reply
4636 Views

Hello, i want to launch a wizard from a ListView after selecting elements ! 
the code bellow adds the button "show wizard" in form view after clicking on a an element (people in my case) 
i want to add this button after selecting several element in more option :

My wizard form : 

<record model="ir.ui.view" id="mywiz" >   
 <field name="name">mywiz</field>
 <field name="model">mytestmodule.wizard</field>
 <field name="arch" type="xml">
 <form string="my wizard">
 <group>
 <field name="name"/>
 </group>
 <footer>
 <button name="create_request" string="Finished" type="object"  class="btn-primary"/>
 <button string="Cancel"  class="btn-default" special="cancel" />
 </footer>
 </form>
 </field>
 </record>
The added button  :

<act_window id ="addedButton" name="Show wizard"
res_model="mytestmodule.wizard"
src_model="mytestmodule.people"
 
view_type="tree" view_mode="form"
target="new"
/>

Mytestmodule.wizard.py : 

class wiz(models.TransientModel):
    _name = 'mytestmodule.wizard'
    name=fields.Text()    
    @api.multi
    def create_request(self): print "You click finish" return True

Avatar
Discard
Best Answer

Hello Jihen Hemicha,


Try below act_window:


<act_window id ="addedButton" multi="True" name="Show wizard" res_model="mytestmodule.wizard" 
src_model="mytestmodule.people" view_type="tree" view_mode="form" target="new"/>


Hope it will helps you.

Thanks,

Avatar
Discard