pos_order.py 268 B

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