# -*- encoding: utf-8 -*- from openerp import models, api, exceptions, _ class StockMove(models.Model): _inherit = "stock.move" @api.multi def button_draft(self): for move in self: move.write({'state': 'draft'}) return True