I'm trying to make a simple wizard. The code I've constructed compiles successfully, but when I press the button from the stock.picking.out screen it loads, and does nothing. No wizard. What am I missing here?
wizard's object file:
from openerp.osv import fields, osv
class pick_ticket(osv.osv_memory):
_name = "pick.ticket"
_description = "Pick Ticket Wizard"
function which calls the wizard:
class res_partner(osv.osv):
_inherit = 'stock.picking'
def generate_pick_ticket(self, cr, uid, ids, context=None):
if context is None:
context = {}
"""Open the partial picking wizard"""
context.update({
'active_model': self._name,
'active_ids': ids,
'active_id': len(ids) and ids[0] or False
})
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'pick.ticket.wizard', #this needs to be identical to res_model
'type': 'ir.actions.act_window',
'target': 'new',
'context': context,
'nodestroy': True,
}
the XML file included in /wizard
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="action_partial_picking" model="ir.actions.act_window">
<field name="name">Pick Ticket</field>
<field name="res_model">pick.ticket.wizard</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>