Hey anyone was able to manually instantiate a new workflow in Odoo 9.0???
Where do I put the code to create the workflow instance? I tried the code below. The workitem and instance get created, and I compared it that what's created when on_create is True, and it seems the same... I don't see what I do wrong... it just doesn't register it correctly... By the way, when I use on_create = True, there is no problem... I just want to have a specific workflow for my specific item.
Any idea what I do wrong?
Thanks
@api.model
def create(self, vals):
res = super(SaleOrder, self).create(vals)
if res.is_print:
res.create_workflow()
return res