~openerp-commiter/openobject-addons/extra-6.0

« back to all changes in this revision

Viewing changes to training/wizard/subscription_line_change_participant.py

  • Committer: Albert Cervera i Areny
  • Date: 2011-06-14 09:51:35 UTC
  • mfrom: (5345.1.165 openobject-addons)
  • Revision ID: albert@nan-tic.com-20110614095135-1x3p6tmil5lxkl9b
Merge and add nan_remove_default_filters

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
            subscription_line = self.pool.get('training.subscription_line').browse(cr, uid, data['id'], context=context)
43
43
            if subscription_line:
44
44
                if subscription_line.state in ('done', 'cancelled'):
45
 
                    raise wizard.except_wizard(_('Warning'),
46
 
                        _("You can not select a subscription with the following state: Done or Cancelled"))
 
45
                    raise osv.except_osv(_('Warning'), _("You can not select a subscription with the following state: Done or Cancelled") )
 
46
 
47
47
                return {
48
48
                    'subscription_id' : subscription_line.subscription_id.id,
49
49
                    'subscription_line_id' : subscription_line.id,
61
61
            return {}
62
62
        subscription_line = self.pool.get('training.subscription_line').browse(cr, uid, data['id'], context=context)
63
63
        if subscription_line.state in ('done', 'cancelled'):
64
 
            raise wizard.except_wizard(_('Warning'),
65
 
                                       _("You can not select a subscription with the following state: Done or Cancelled"))
 
64
            raise osv.except_osv(_('Warning'), _("You can not select a subscription with the following state: Done or Cancelled") )
 
65
 
66
66
        subscription_line.write({'job_id' : new_job_id, 'job_email' : data['form']['new_job_email']})
67
67
        return {}
68
68