Odoo Help

0

Launch wizard after selecting elements in treeView

By
Jihane Hemicha
on 2/18/17, 7:10 AM 827 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

0

Jignesh Mehta

--Jignesh Mehta--
3265
| 6 5 8
Surat, India
--Jignesh Mehta--

- I have 3+ years of Industry Experience, specializing Odoo Development, Analysis, Customization, Implementation, Integration.
- I have done many Customization modules in Sale, Purchase, Point of Sale, Inventory, CRM and much more. Also Worked in the Odoo Themes like Business Theme or E-Commerce Theme.
- Develop Jewelery Manufacturing process from Scratch. It have more than 10 Department. Develop PDF and Excel reports for this project around 150 per format.

Jignesh Mehta
On 9/21/17, 7:26 AM

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,

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 2/18/17, 7:10 AM
Seen: 827 times
Last updated: 9/21/17, 7:26 AM