[IMP]Improvement in code

bzr revid: gpa@tinyerp.com-20110803115348-kg6lhy40ylk4hnvq
This commit is contained in:
gpa
2011-08-03 17:23:48 +05:30
parent c761404086
commit 3e5e4dce7c
+5 -1
View File
@@ -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):