Reputation: 157
I'm currently building a module which needs a wizard opening from a button. The problem is that when i click on this button, nothing happens except 2 lines in the console :
"POST /web/action/load HTTP/1.1" 200 -
"POST /web/dataset/call_kw/stock.move/search_read HTTP/1.1" 200 -
Here are the declaration of button, action and wizard :
<button string="Créer un colis" icon="terp-accessories-archiver+"
name="launch_split_into_wizard" type="action"
attrs="{'invisible':[('state','=','done')]}"/>
<!-- WIZARD -->
<record model="ir.ui.view" id="split_livraison_into_wizard">
<field name="name">split.livraison.into.wizard</field>
<field name="model">stock.livraison.split.into</field>
<field name="arch" type="xml">
<form string="Split Moves">
...
</form>
</field>
</record>
<!-- ACTION -->
<record id="split_livraison_into" model="ir.actions.act_window">
<field name="name">Gestion des colis</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">stock.livraison.split.into</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
I've tried the official tutorial "Building a module" from odoo.com, but that didn't work. I don't find a solution working for Odoo 8
Upvotes: 1
Views: 840
Reputation: 1623
Name for buttons with type="action"
should be a ref to action. F.ex.
<button string="Créer un colis"
icon="terp-accessories-archiver+"
name="%(your_module_name.split_livraison_into)d" type="action"
attrs="{'invisible':[('state','=','done')]}"/>
Where your_module_name
- name of module where described action.
split_livraison_into
- id of action
Upvotes: 3