On Feb 10, 2014, at 1:48 AM, oscar_alvarez <oscar.alvarez.mont...@gmail.com> wrote: > > It is possible call to Wizard from cron function?
Yes, but indirectly through a class method in a model. The class method would be called by the cron [1] and the class method can then invoke a wizard. I have written a simple example below: WizardKlass = Pool().get(‘wizard.name', type='wizard’) session = WizardKlass.create()[0] wizard_instance = WizardKlass(session) Now you can use the wizard instance like an active record. wizard_instance.some_view.field = ‘Something' Or call methods like transition methods. wizard_instance.transition_add() [1] https://github.com/tryton/trytond/blob/develop/trytond/ir/cron.py#L160 Thanks & Regards Sharoon Thomas Openlabs Technologies & Consulting (P) Limited w: http://www.openlabs.co.in m: +1 813.793.6736 (OPEN) Extn. 200 t: @sharoonthomas - We win when our customers win
signature.asc
Description: Message signed with OpenPGP using GPGMail