diff options
| author | Sanjay Gohel (Open ERP) <sgo@tinyerp.com> | 2012-05-08 14:51:43 +0530 |
|---|---|---|
| committer | Sanjay Gohel (Open ERP) <sgo@tinyerp.com> | 2012-05-08 14:51:43 +0530 |
| commit | a6a7276d890488085bc2eec46f57e44425df3a4b (patch) | |
| tree | b09e8d2953ec8de970802645d39a6e940b106165 /addons/project/static/src | |
| parent | 38fd7fa19df5d752c05eb21fad9f07daccca4395 (diff) | |
[IMP]remove open_model method from project related module and add action as per required
bzr revid: sgo@tinyerp.com-20120508092143-ah3siaudwp7jixc8
Diffstat (limited to 'addons/project/static/src')
| -rw-r--r-- | addons/project/static/src/js/project.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index 27874b24f25..d841734bacf 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -16,7 +16,6 @@ openerp.project = function(openerp) { }); }); - // set sequence like Tasks,Issues,Timesheets and Phases my_list = $("#list a") my_list.sort(function (a, b) { @@ -26,8 +25,16 @@ openerp.project = function(openerp) { }); $('#list').replaceWith(my_list); - //if task is true , then open the task when click on the anywhere in the box. - if(this.record.use_tasks.raw_value)$(this.$element).find('.click_button').attr('data-name',my_list[0].getAttribute('data-name')); + //it opens action in sequence which ever is first. + if (my_list.length!=0){ + $(this.$element).find('.click_button').attr('data-name',my_list[0].getAttribute('data-name')); + } + else{ + $(this.$element).find('.click_button').attr('data-name','dummy'); + } + if(isNaN(parseInt($(this.$element).find('.click_button').attr('data-name')))){ + $(this.$element).find('.click_button').attr('data-type',"object") + } /* set background color. we can do other way to implement new widget. |
