diff options
| author | Vo Minh Thu <vmt@openerp.com> | 2012-01-16 12:06:31 +0100 |
|---|---|---|
| committer | Vo Minh Thu <vmt@openerp.com> | 2012-01-16 12:06:31 +0100 |
| commit | 3203d264aecd751a8c261cea4f72fa323a3098be (patch) | |
| tree | 93cdf7c89795b809963ef08a68d84d293cf41a7a /addons/web_process/static/src | |
| parent | 1497062ba1dbfd814c69fa4250c4eb6a09a5206a (diff) | |
| parent | 064a50bcde5f1c65a17f4feb42348b5809081085 (diff) | |
[MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120116110631-lrzp6uxsjki7by22
Diffstat (limited to 'addons/web_process/static/src')
| -rw-r--r-- | addons/web_process/static/src/js/process.js | 27 | ||||
| -rw-r--r-- | addons/web_process/static/src/xml/web_process.xml | 31 |
2 files changed, 5 insertions, 53 deletions
diff --git a/addons/web_process/static/src/js/process.js b/addons/web_process/static/src/js/process.js index 8d4396ba403..601973d4cb5 100644 --- a/addons/web_process/static/src/js/process.js +++ b/addons/web_process/static/src/js/process.js @@ -28,8 +28,7 @@ openerp.web_process = function (openerp) { }, initialize_process_view: function() { var self = this; - $.when(this.fields_get(), this.help(), this.get_process_object()).pipe(function(fields, help, process) { - self.process_fields = fields; + $.when(this.help(), this.get_process_object()).pipe(function(help, process) { self.process_help = help; if(process && process.length) { if(process.length > 1) { @@ -46,9 +45,9 @@ openerp.web_process = function (openerp) { self.graph_get().done(function(res) { self.process_notes = res.notes; self.process_title = res.name; - self.process_subflows = _.filter(res.nodes, function(x) { - return x.subflow != false; - }); + self.process_subflows = _(res.nodes).chain() + .filter(function (node) { return node['subflow'] !== false; }) + .uniq(false, function (node) { return node['subflow'][0]; }).value(); self.process_related = res.related; def.resolve(res); }); @@ -78,17 +77,6 @@ openerp.web_process = function (openerp) { }); return def.promise(); }, - fields_get : function() { - var self = this, - def = $.Deferred(), - dataset = new openerp.web.DataSetStatic(this, this.model || this.dataset.model, this.session.context); - dataset - .call('fields_get',[]) - .done(function(fields) { - def.resolve(fields); - }).fail(def.reject); - return def.promise(); - }, help : function() { var self = this, def = $.Deferred(); @@ -145,11 +133,6 @@ openerp.web_process = function (openerp) { self.initialize_process_view(); }); - this.$element.find(".toggle_fields").click(function() { - $(this).children().toggle(); - self.$element.find('.process_fields').toggle(); - }); - this.$element.find(".process_subflow").click(function() { self.process_id = this.id; self.initialize_process_view(); @@ -286,7 +269,7 @@ openerp.web_process = function (openerp) { $(this).dialog('destroy'); }} ] - }).start().open(); + }).open(); action_manager.appendTo(dialog.$element); action_manager.do_action({ diff --git a/addons/web_process/static/src/xml/web_process.xml b/addons/web_process/static/src/xml/web_process.xml index e1e2e7a6e8d..d6d2e73715b 100644 --- a/addons/web_process/static/src/xml/web_process.xml +++ b/addons/web_process/static/src/xml/web_process.xml @@ -107,37 +107,6 @@ <tr t-if="process_id"> <td> <button class="oe_button" id="edit_process">Edit Process</button> - <button class="oe_button toggle_fields"> - <span>Show Fields</span> - <span>Hide Fields</span> - </button> - </td> - </tr> - <tr t-if="process_id"> - <td class="process_fields"> - <table> - <t t-foreach="process_fields" t-as="field"> - <tr> - <td> - <t t-esc="field"/> - </td> - <td> - <table> - <t t-foreach="field_value" t-as="fld"> - <tr> - <td> - <t t-esc="fld"/>: - </td> - <td> - <t t-esc="fld_value"/> - </td> - </tr> - </t> - </table> - </td> - </tr> - </t> - </table> </td> </tr> </table> |
