Allow keyword action for all models
issue9450 review325681002
This commit is contained in:
1 parent
f376687b5a
commit
5ea5007bfc
2 files changed
+6
-2
No files matched your search
@@ -1,3 +1,4 @@
|
||||
* Allow keyword action for all models
|
||||
* Add sortable_values in tools
|
||||
* Remove default colors on graph and calendar
|
||||
* Add model, record and records attributes on Wizard
|
||||
|
||||
@@ -204,7 +204,7 @@ class ActionKeyword(ModelSQL, ModelView):
|
||||
def models_get():
|
||||
pool = Pool()
|
||||
Model = pool.get('ir.model')
|
||||
return [(m.model, m.name) for m in Model.search([])]
|
||||
return [(None, '')] + [(m.model, m.name) for m in Model.search([])]
|
||||
|
||||
@classmethod
|
||||
def delete(cls, keywords):
|
||||
@@ -246,7 +246,10 @@ class ActionKeyword(ModelSQL, ModelView):
|
||||
|
||||
clause = [
|
||||
('keyword', '=', keyword),
|
||||
('model', '=', model + ',-1'),
|
||||
['OR',
|
||||
('model', '=', model + ',-1'),
|
||||
('model', '=', None),
|
||||
],
|
||||
]
|
||||
if model_id >= 0:
|
||||
clause = ['OR',
|
||||
|
||||
Reference in new issue
Block a user