openerp-mgmtsystem-core-editors team mailing list archive
-
openerp-mgmtsystem-core-editors team
-
Mailing list archive
-
Message #00005
[Merge] lp:~savoirfairelinux-openerp/openerp-mgmtsystem/bug-1219854 into lp:openerp-mgmtsystem
You have been requested to review the proposed merge of lp:~savoirfairelinux-openerp/openerp-mgmtsystem/bug-1219854 into lp:openerp-mgmtsystem.
For more details, see:
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-mgmtsystem/bug-1219854/+merge/183936
Added check in wtk_close which raises an exception if it contains an action that is not 'done'.
--
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-mgmtsystem/bug-1219854/+merge/183936
Your team OpenERP Management System Core Editors is requested to review the proposed merge of lp:~savoirfairelinux-openerp/openerp-mgmtsystem/bug-1219854 into lp:openerp-mgmtsystem.
=== modified file 'mgmtsystem_nonconformity/mgmtsystem_nonconformity.py'
--- mgmtsystem_nonconformity/mgmtsystem_nonconformity.py 2013-08-25 14:58:18 +0000
+++ mgmtsystem_nonconformity/mgmtsystem_nonconformity.py 2013-09-04 17:36:39 +0000
@@ -272,6 +272,8 @@
def wkf_close(self, cr, uid, ids, context=None):
"""Change state from in progress to closed"""
o = self.browse(cr, uid, ids, context=context)[0]
+ if [i for i in o.action_ids if i.state != 'done']:
+ raise orm.except_orm(_('Error !'), _('Not all actions have been closed.'))
if not o.evaluation_date:
raise orm.except_orm(_('Error !'), _('Effectiveness evaluation must be performed before closing.'))
self.message_post(cr, uid, self.browse(cr, uid, ids, context=context), _('Close'))