summaryrefslogtreecommitdiff
path: root/addons/base/static/src
diff options
context:
space:
mode:
authorVidhin Mehta (OpenERP) <vme@tinyerp.com>2011-09-05 18:02:36 +0530
committerVidhin Mehta (OpenERP) <vme@tinyerp.com>2011-09-05 18:02:36 +0530
commitc7d4e3d73d3ee294ec963532bf68380f93d553ad (patch)
tree45d6cb54a35136283d101506bcd805a4bb7607a4 /addons/base/static/src
parentce3c9f0e7b2fddcffe88383d26a901d9d85c84a1 (diff)
[fix]manage view error after closing it.
bzr revid: vme@tinyerp.com-20110905123236-2a4ow4z9yq3egsql
Diffstat (limited to 'addons/base/static/src')
-rw-r--r--addons/base/static/src/js/view_editor.js45
-rw-r--r--addons/base/static/src/xml/base.xml15
2 files changed, 47 insertions, 13 deletions
diff --git a/addons/base/static/src/js/view_editor.js b/addons/base/static/src/js/view_editor.js
index 0bdfc6df87f..dd1dd0a93b1 100644
--- a/addons/base/static/src/js/view_editor.js
+++ b/addons/base/static/src/js/view_editor.js
@@ -1,13 +1,11 @@
openerp.base.view_editor = function(openerp) {
-openerp.base.ViewEditor = openerp.base.Dialog.extend({
+openerp.base.ViewEditor = openerp.base.Widget.extend({
init: function(parent, element_id, dataset, view, options) {
this._super(parent);
- self.template = 'ViewEditor';
this.element_id = element_id
this.parent = parent
this.dataset = dataset;
this.model = dataset.model;
-
this.fields_views = view;
},
start: function() {
@@ -29,30 +27,57 @@ openerp.base.ViewEditor = openerp.base.Dialog.extend({
action_buttons:false,
search_view:false,
pager:false,
+ radio:true
},
};
var action_manager = new openerp.base.ActionManager(this);
this.dialog = new openerp.base.Dialog(this,{
modal: true,
title: 'ViewEditor',
- width: 600,
+ width: 750,
height: 500,
buttons: {
-
- Cancel: function(){
+ "Create": function(){
$(this).dialog('destroy');
},
- Edit: function(){
+ "Edit": function(){
+ self.Edit_view();
},
- Create: function(){
+ " Close": function(){
}
},
+
});
- this.dialog.start();
+ this.dialog.start();
this.dialog.open();
action_manager.appendTo(this.dialog);
- action_manager.render(this.dialog);
action_manager.do_action(action);
},
+
+ Edit_view : function(){
+
+ this.dialog = new openerp.base.Dialog(this,{
+ modal: true,
+ title: 'Edit Xml',
+ width: 750,
+ height: 500,
+ buttons: {
+ "Inherited View": function(){
+
+ },
+ "Preview": function(){
+
+ },
+ "Close": function(){
+ $(this).dialog('destroy');
+
+ }
+ },
+
+ });
+ this.dialog.start().open();
+
+ }
+
});
};
diff --git a/addons/base/static/src/xml/base.xml b/addons/base/static/src/xml/base.xml
index c6bd9a1ee19..174eda0789a 100644
--- a/addons/base/static/src/xml/base.xml
+++ b/addons/base/static/src/xml/base.xml
@@ -602,9 +602,18 @@
</td>
</t>
- <th t-if="options.selectable" class="oe-record-selector" width="1">
- <input type="checkbox"/>
- </th>
+ <t t-if="options.radio">
+ <th t-if="options.selectable" class="oe-record-selector" width="1">
+ <input type="radio" group ="radiogroup"/>
+ </th>
+ </t>
+ <t t-if="!options.radio">
+ <th t-if="options.selectable" class="oe-record-selector" width="1">
+ <input type="checkbox"/>
+ </th>
+ </t>
+
+
<t t-foreach="columns" t-as="column">
<t t-set="align" t-value="column.type === 'integer' or column.type == 'float'"/>
<td t-if="!column.meta and column.invisible !== '1'" t-att-title="column.help"