Yogesh(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/training_seance_task_2335_ysa into 
lp:~openobject-training/openobject-addons/training.

Requested reviews:
  Bhumika (OpenERP) (sbh-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/training_seance_task_2335_ysa/+merge/63991

[FIX] training :- if all session not cancel in seance and cancel seance then 
display the error message.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/training_seance_task_2335_ysa/+merge/63991
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/training_seance_task_2335_ysa.
=== modified file 'training/training.py'
--- training/training.py	2011-06-07 10:18:50 +0000
+++ training/training.py	2011-06-09 11:28:31 +0000
@@ -2645,6 +2645,9 @@
     def test_workflow_cancel(self, cr, uid, ids, context=None):
         can_be_cancelled = any(session.state in ('cancelled', 'inprogress') for seance in self.browse(cr, uid, ids, context)
                                for session in seance.session_ids)
+        if not can_be_cancelled:
+            raise osv.except_osv(_("Warning"),
+                                 _("You must be cancel all related session !"))
         return can_be_cancelled
 
     # training.seance

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to