sale_order.py 519 B

12345678910111213141516171819
  1. # -*- encoding: utf-8 -*-
  2. from openerp import models, fields, api, _
  3. from openerp.exceptions import Warning
  4. import openerp.addons.decimal_precision as dp
  5. from datetime import datetime
  6. from openerp.tools import float_compare
  7. class sale_order(models.Model):
  8. _inherit = 'sale.order'
  9. transfered = fields.Boolean(string="Transferido", readonly=True)
  10. @api.one
  11. def action_wait(self):
  12. res = super(sale_order, self).action_wait()
  13. self.write({'state': 'progress'})
  14. return res