跳至内容
菜单
此问题已终结
1 回复
5852 查看

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

形象
丢弃
最佳答案

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,

形象
丢弃
相关帖文 回复 查看 活动
1
6月 18
5564
2
11月 17
6059
1
1月 17
3597
3
1月 24
12982
0
4月 21
3405