projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0559c0f
)
[FIX] orm, workflow: do not disable wkf buttons unless explicit group is set on trans...
author
Olivier Dony
<odo@openerp.com>
Fri, 15 Oct 2010 20:06:55 +0000
(22:06 +0200)
committer
Olivier Dony
<odo@openerp.com>
Fri, 15 Oct 2010 20:06:55 +0000
(22:06 +0200)
bzr revid: odo@openerp.com-
20101015200655
-xcn22gdoka0n4gys
bin/osv/orm.py
patch
|
blob
|
history
diff --git
a/bin/osv/orm.py
b/bin/osv/orm.py
index
6c62665
..
4c3c5d6
100644
(file)
--- a/
bin/osv/orm.py
+++ b/
bin/osv/orm.py
@@
-1382,8
+1382,9
@@
class orm_template(object):
INNER JOIN wkf_transition t ON (t.act_to = a.id)
WHERE wkf.osv = %s
AND t.signal = %s
+ AND t.group_id is NOT NULL
""", (self._name, button.get('name')))
- group_ids = [x[0] for x in cr.fetchall()]
+ group_ids = [x[0] for x in cr.fetchall() if x[0]]
can_click = not group_ids or bool(set(user_groups).intersection(group_ids))
button.set('readonly', str(int(not can_click)))
return node