Add Dict widget to tree view
It is needed to be able to search on dict. issue8296 review271331012
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
* Add Dict widget for tree view
|
||||
|
||||
Version 5.2.0 - 2019-05-06
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add domain inversion for reference fields
|
||||
|
||||
@@ -1793,6 +1793,14 @@
|
||||
}
|
||||
});
|
||||
|
||||
Sao.View.Tree.DictColumn = Sao.class_(Sao.View.Tree.CharColumn, {
|
||||
class_: 'column-dict',
|
||||
update_text: function(cell, record) {
|
||||
var text = '(' + Object.keys(this.field.get_client(record)).length + ')';
|
||||
cell.text(text).attr('title', text);
|
||||
},
|
||||
});
|
||||
|
||||
Sao.View.Tree.DateColumn = Sao.class_(Sao.View.Tree.CharColumn, {
|
||||
class_: 'column-date',
|
||||
update_text: function(cell, record) {
|
||||
@@ -2028,6 +2036,7 @@
|
||||
'callto': Sao.View.Tree.URLColumn,
|
||||
'char': Sao.View.Tree.CharColumn,
|
||||
'date': Sao.View.Tree.DateColumn,
|
||||
'dict': Sao.View.Tree.DictColumn,
|
||||
'email': Sao.View.Tree.URLColumn,
|
||||
'float': Sao.View.Tree.FloatColumn,
|
||||
'image': Sao.View.Tree.ImageColumn,
|
||||
|
||||
Reference in New Issue
Block a user