Hello every one, kindda lost here in this situation. I have my method, my aim is to return some view if some condition is meet. Here is the logic of what i made.
def my_method(self,cr,uid,ids,context=None):
some_var1
some_var2
...
if some_var1 < some_var2:
return {
'type': 'ir.actions.act_window',
'name': 'The Trial',
'res_model': 'alphalist',
'view_mode': 'tree',
'res_id': my_record_tree1,
'target': 'current',
'nodestroy': False,
}
elif some_var1 == some_var2:
return {
'type': 'ir.actions.act_window',
'name': 'The Judges',
'res_model': 'alphalist',
'view_mode': 'tree',
'res_id': my_record_tree2,
'target': 'current',
'nodestroy': False,
}
....
BUT, upon running nothing is bieng returned. Does any one can help/enlighten me. PLS!
This question has been flagged
1
Reply
4684
Views
Hi, is this the whole snap of the code? If so, there's no else in your statement, which might be the reason why your are not getting a window!
i have put else, but still no view is bieng returned.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up