2014-03-05 15:59 GMT+01:00 Jean C <jean.cava...@coopengo.com>: > I'm trying to link the end of wizard with the start of another. The >> problem is that I'm not able to pass the context of the first wizard to the >> second one. Is it possible to do so? And in affirmative case, how? >> > > I would use a StateAction in the first wizard mapped on the second wizard > action. > > You can set the context in the "do_<action_name>" method return value. > > Ok, thanks. I'm trying this:
class CarrierSendShipments(Wizard): 'Carrier Send Shipments' __name__ = "carrier.send.shipments" [...] print_ = StateAction( 'carrier_send_shipments.wizard_carrier_print_shipment') def do_print_(self, action): active_ids = Transaction().context['active_ids'] action['pyson_context'] = PYSONEncoder().encode({ 'active_ids': active_ids, }) return action, {} class CarrierPrintShipment(Wizard): 'Carrier Print Shipment' __name__ = "carrier.print.shipment" [...] def default_start(self, fields): Shipment = Pool().get('stock.shipment.out') shipments = Shipment.search([ ('id', 'in', Transaction().context['active_ids']), ]) But in the second wizard, I do not get anything in the context. What am I doing wrong? > > Jean Cavallo > *Coopengo* > -- Jesús Martín Zikzakmedia SL Dr. Fleming, 28, baixos 08720 Vilafranca del Penedès ☏ 93 890 21 08