From 3e5e4dce7c391c1b985be33b146e7b4ec800c283 Mon Sep 17 00:00:00 2001 From: gpa Date: Wed, 3 Aug 2011 17:23:48 +0530 Subject: [PATCH] [IMP]Improvement in code bzr revid: gpa@tinyerp.com-20110803115348-kg6lhy40ylk4hnvq --- openerp/addons/base/ir/workflow/workflow.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openerp/addons/base/ir/workflow/workflow.py b/openerp/addons/base/ir/workflow/workflow.py index 414420d6c81..36102878c20 100644 --- a/openerp/addons/base/ir/workflow/workflow.py +++ b/openerp/addons/base/ir/workflow/workflow.py @@ -153,7 +153,7 @@ class wkf_transition(osv.osv): "signal tests the name of the pressed button. If signal is NULL, no button is necessary to validate this transition."), 'group_id': fields.many2one('res.groups', 'Group Required', help="The group that a user must have to be authorized to validate this transition."), - 'condition': fields.char('Condition', size=128, + 'condition': fields.char('Condition', required=True, size=128, help="Expression to be satisfied if we want the transition done."), 'act_from': fields.many2one('workflow.activity', 'Source Activity', required=True, select=True, ondelete='cascade', help="Source activity. When this activity is over, the condition is tested to determine if we can start the ACT_TO activity."), @@ -162,6 +162,10 @@ class wkf_transition(osv.osv): 'wkf_id': fields.related('act_from','wkf_id', type='many2one', relation='workflow', string='Workflow', select=True), } + _defaults = { + 'condition': lambda *a: 'False', + } + wkf_transition() class wkf_instance(osv.osv):