I would like to inherit purchase.order to add a custom action method for a workflow. Do I need to code everything in the old API like
self.write(cr, uid, ids, {'state': 'approved'})
or can I code things like
self.state='approved'
? Is there a standard way to do this?