purchase_order.py 440 B

1234567891011121314151617
  1. # -*- coding: utf-8 -*-
  2. from openerp import api, models
  3. class PurchaseOrder(models.Model):
  4. _inherit = 'purchase.order'
  5. '''
  6. '''
  7. def action_purchase_confirm(self, cr, uid, ids, context=None):
  8. if not context:
  9. context = {}
  10. assert len(ids) == 1, 'This option should only be used for a single id at a time'
  11. self.signal_workflow(cr, uid, ids, 'purchase_confirm')
  12. return True