[MERGE] MErge with trunk upto revision no 1202.
bzr revid: ysa@tinyerp.com-20111011050327-wsyzdd0x53yiat6h
This commit is contained in:
@@ -199,6 +199,11 @@ class CompoundDomain(BaseDomain):
|
||||
self.add(domain)
|
||||
|
||||
def evaluate(self, context=None):
|
||||
ctx = dict(context or {})
|
||||
eval_context = self.get_eval_context()
|
||||
if eval_context:
|
||||
eval_context = self.session.eval_context(eval_context)
|
||||
ctx.update(eval_context)
|
||||
final_domain = []
|
||||
for domain in self.domains:
|
||||
if not isinstance(domain, (list, BaseDomain)):
|
||||
@@ -208,9 +213,6 @@ class CompoundDomain(BaseDomain):
|
||||
if isinstance(domain, list):
|
||||
final_domain.extend(domain)
|
||||
continue
|
||||
|
||||
ctx = dict(context or {})
|
||||
ctx.update(self.get_eval_context() or {})
|
||||
|
||||
domain.session = self.session
|
||||
final_domain.extend(domain.evaluate(ctx))
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 91 B |
@@ -613,11 +613,11 @@ openerp.web.BufferedDataSet = openerp.web.DataSetStatic.extend({
|
||||
create: function(data, callback, error_callback) {
|
||||
var cached = {id:_.uniqueId(this.virtual_id_prefix), values: data,
|
||||
defaults: this.last_default_get};
|
||||
this.to_create.push(cached);
|
||||
this.to_create.push(_.extend(_.clone(cached), {values: _.clone(cached.values)}));
|
||||
this.cache.push(cached);
|
||||
this.on_change();
|
||||
var prom = $.Deferred().then(callback);
|
||||
setTimeout(function() {prom.resolve({result: cached.id});}, 0);
|
||||
prom.resolve({result: cached.id});
|
||||
return prom.promise();
|
||||
},
|
||||
write: function (id, data, options, callback) {
|
||||
@@ -695,7 +695,7 @@ openerp.web.BufferedDataSet = openerp.web.DataSetStatic.extend({
|
||||
throw "Record not correctly loaded";
|
||||
}
|
||||
}
|
||||
setTimeout(function () {completion.resolve(records);}, 0);
|
||||
completion.resolve(records);
|
||||
};
|
||||
if(to_get.length > 0) {
|
||||
var rpc_promise = this._super(to_get, fields, function(records) {
|
||||
@@ -720,27 +720,51 @@ openerp.web.BufferedDataSet = openerp.web.DataSetStatic.extend({
|
||||
});
|
||||
openerp.web.BufferedDataSet.virtual_id_regex = /^one2many_v_id_.*$/;
|
||||
|
||||
openerp.web.ReadOnlyDataSetSearch = openerp.web.DataSetSearch.extend({
|
||||
openerp.web.ProxyDataSet = openerp.web.DataSetSearch.extend({
|
||||
init: function() {
|
||||
this._super.apply(this, arguments);
|
||||
this.create_function = null;
|
||||
this.write_function = null;
|
||||
this.read_function = null;
|
||||
},
|
||||
read_ids: function () {
|
||||
if (this.read_function) {
|
||||
return this.read_function.apply(null, arguments);
|
||||
} else {
|
||||
return this._super.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
default_get: function(fields, callback) {
|
||||
return this._super(fields, callback).then(this.on_default_get);
|
||||
},
|
||||
on_default_get: function(result) {},
|
||||
create: function(data, callback, error_callback) {
|
||||
this.on_create(data);
|
||||
var to_return = $.Deferred().then(callback);
|
||||
setTimeout(function () {to_return.resolve({"result": undefined});}, 0);
|
||||
return to_return.promise();
|
||||
if (this.create_function) {
|
||||
return this.create_function(data, callback, error_callback);
|
||||
} else {
|
||||
console.warn("trying to create a record using default proxy dataset behavior");
|
||||
var to_return = $.Deferred().then(callback);
|
||||
setTimeout(function () {to_return.resolve({"result": undefined});}, 0);
|
||||
return to_return.promise();
|
||||
}
|
||||
},
|
||||
on_create: function(data) {},
|
||||
write: function (id, data, options, callback) {
|
||||
this.on_write(id, data);
|
||||
var to_return = $.Deferred().then(callback);
|
||||
setTimeout(function () {to_return.resolve({"result": true});}, 0);
|
||||
return to_return.promise();
|
||||
if (this.write_function) {
|
||||
return this.write_function(id, data, options, callback);
|
||||
} else {
|
||||
console.warn("trying to write a record using default proxy dataset behavior");
|
||||
var to_return = $.Deferred().then(callback);
|
||||
setTimeout(function () {to_return.resolve({"result": true});}, 0);
|
||||
return to_return.promise();
|
||||
}
|
||||
},
|
||||
on_write: function(id, data) {},
|
||||
unlink: function(ids, callback, error_callback) {
|
||||
this.on_unlink(ids);
|
||||
console.warn("trying to unlink a record using default proxy dataset behavior");
|
||||
var to_return = $.Deferred().then(callback);
|
||||
setTimeout(function () {to_return.resolve({"result": true});}, 0);
|
||||
return to_return.promise();
|
||||
|
||||
@@ -11,6 +11,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
|
||||
*/
|
||||
searchable: false,
|
||||
form_template: "FormView",
|
||||
identifier_prefix: 'formview-',
|
||||
/**
|
||||
* @constructs openerp.web.FormView
|
||||
* @extends openerp.web.View
|
||||
@@ -424,8 +425,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
|
||||
// should not happen in the server, but may happen for internal purpose
|
||||
return $.Deferred().reject();
|
||||
} else {
|
||||
this.reload();
|
||||
return $.Deferred().then(success).resolve(r);
|
||||
return this.reload().then(success);
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -459,8 +459,9 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
|
||||
this.sidebar.attachments.do_update();
|
||||
}
|
||||
console.debug("The record has been created with id #" + this.datarecord.id);
|
||||
this.reload();
|
||||
return $.Deferred().then(success).resolve(_.extend(r, {created: true}));
|
||||
return this.reload().pipe(function() {
|
||||
return _.extend(r, {created: true});
|
||||
}).then(success);
|
||||
}
|
||||
},
|
||||
on_action: function (action) {
|
||||
@@ -471,9 +472,9 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
|
||||
},
|
||||
reload: function() {
|
||||
if (this.dataset.index == null || this.dataset.index < 0) {
|
||||
this.on_button_new();
|
||||
return $.when(this.on_button_new());
|
||||
} else {
|
||||
this.dataset.read_index(_.keys(this.fields_view.fields), this.on_record_loaded);
|
||||
return this.dataset.read_index(_.keys(this.fields_view.fields), this.on_record_loaded);
|
||||
}
|
||||
},
|
||||
get_fields_values: function() {
|
||||
@@ -1083,7 +1084,11 @@ openerp.web.form.Field = openerp.web.form.Widget.extend(/** @lends openerp.web.f
|
||||
* the fields'context with the action's context.
|
||||
*/
|
||||
build_context: function() {
|
||||
var f_context = this.field.context || null;
|
||||
var f_context = this.field.context || {};
|
||||
if (!!f_context.__ref) {
|
||||
var fields_values = this._build_eval_context();
|
||||
f_context = new openerp.web.CompoundDomain(f_context).set_eval_context(fields_values);
|
||||
}
|
||||
// maybe the default_get should only be used when we do a default_get?
|
||||
var v_contexts = _.compact([this.node.attrs.default_get || null,
|
||||
this.node.attrs.context || null]);
|
||||
@@ -1098,14 +1103,15 @@ openerp.web.form.Field = openerp.web.form.Widget.extend(/** @lends openerp.web.f
|
||||
return ctx;
|
||||
},
|
||||
build_domain: function() {
|
||||
var f_domain = this.field.domain || null;
|
||||
var v_domain = this.node.attrs.domain || [];
|
||||
if (!(v_domain instanceof Array) || true) { //TODO niv: remove || true
|
||||
var fields_values = this._build_eval_context();
|
||||
v_domain = new openerp.web.CompoundDomain(v_domain).set_eval_context(fields_values);
|
||||
}
|
||||
var f_domain = this.field.domain || [];
|
||||
var n_domain = this.node.attrs.domain || null;
|
||||
// if there is a domain on the node, overrides the model's domain
|
||||
return f_domain || v_domain;
|
||||
var final_domain = n_domain !== null ? n_domain : f_domain;
|
||||
if (!(final_domain instanceof Array)) {
|
||||
var fields_values = this._build_eval_context();
|
||||
final_domain = new openerp.web.CompoundDomain(final_domain).set_eval_context(fields_values);
|
||||
}
|
||||
return final_domain;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2067,11 +2073,14 @@ openerp.web.form.One2ManyListView = openerp.web.ListView.extend({
|
||||
pop.select_element(self.o2m.field.relation,{
|
||||
initial_view: "form",
|
||||
alternative_form_view: self.o2m.field.views ? self.o2m.field.views["form"] : undefined,
|
||||
create_function: function(data) {
|
||||
return self.o2m.dataset.create(data, function(r) {
|
||||
create_function: function(data, callback, error_callback) {
|
||||
return self.o2m.dataset.create(data).then(function(r) {
|
||||
self.o2m.dataset.set_ids(self.o2m.dataset.ids.concat([r.result]));
|
||||
self.o2m.dataset.on_change();
|
||||
});
|
||||
}).then(callback, error_callback);
|
||||
},
|
||||
read_function: function() {
|
||||
return self.o2m.dataset.read_ids.apply(self.o2m.dataset, arguments);
|
||||
},
|
||||
parent_view: self.o2m.view,
|
||||
form_view_options: {'not_interactible_on_create':true}
|
||||
@@ -2208,6 +2217,7 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
|
||||
* - parent_view
|
||||
* - form_view_options
|
||||
* - list_view_options
|
||||
* - read_function
|
||||
*/
|
||||
select_element: function(model, options, domain, context) {
|
||||
var self = this;
|
||||
@@ -2216,7 +2226,7 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
|
||||
this.context = context || {};
|
||||
this.options = _.defaults(options || {}, {"initial_view": "search", "create_function": function() {
|
||||
return self.create_row.apply(self, arguments);
|
||||
}});
|
||||
}, read_function: null});
|
||||
this.initial_ids = this.options.initial_ids;
|
||||
this.created_elements = [];
|
||||
openerp.web.form.dialog(this.render(), {close:function() {
|
||||
@@ -2226,8 +2236,18 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
|
||||
},
|
||||
start: function() {
|
||||
this._super();
|
||||
this.dataset = new openerp.web.ReadOnlyDataSetSearch(this, this.model,
|
||||
var self = this;
|
||||
this.dataset = new openerp.web.ProxyDataSet(this, this.model,
|
||||
this.context);
|
||||
this.dataset.create_function = function() {
|
||||
return self.options.create_function.apply(null, arguments).then(function(r) {
|
||||
self.created_elements.push(r.result);
|
||||
});
|
||||
};
|
||||
this.dataset.write_function = function() {
|
||||
return self.write_row.apply(self, arguments);
|
||||
};
|
||||
this.dataset.read_function = this.options.read_function;
|
||||
this.dataset.parent_view = this.options.parent_view;
|
||||
this.dataset.on_default_get.add(this.on_default_get);
|
||||
if (this.options.initial_view == "search") {
|
||||
@@ -2292,11 +2312,17 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
|
||||
self.view_list.do_search(results.domain, results.context, results.group_by);
|
||||
});
|
||||
},
|
||||
create_row: function(data) {
|
||||
create_row: function() {
|
||||
var self = this;
|
||||
var wdataset = new openerp.web.DataSetSearch(this, this.model, this.context, this.domain);
|
||||
wdataset.parent_view = this.options.parent_view;
|
||||
return wdataset.create(data);
|
||||
return wdataset.create.apply(wdataset, arguments);
|
||||
},
|
||||
write_row: function() {
|
||||
var self = this;
|
||||
var wdataset = new openerp.web.DataSetSearch(this, this.model, this.context, this.domain);
|
||||
wdataset.parent_view = this.options.parent_view;
|
||||
return wdataset.write.apply(wdataset, arguments);
|
||||
},
|
||||
on_select_elements: function(element_ids) {
|
||||
},
|
||||
@@ -2327,33 +2353,21 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
|
||||
$buttons.html(QWeb.render("SelectCreatePopup.form.buttons", {widget:self}));
|
||||
var $nbutton = $buttons.find(".oe_selectcreatepopup-form-save-new");
|
||||
$nbutton.click(function() {
|
||||
self._created = $.Deferred().then(function() {
|
||||
self._created = undefined;
|
||||
$.when(self.view_form.do_save()).then(function() {
|
||||
self.view_form.on_button_new();
|
||||
});
|
||||
self.view_form.do_save();
|
||||
});
|
||||
var $nbutton = $buttons.find(".oe_selectcreatepopup-form-save");
|
||||
$nbutton.click(function() {
|
||||
self._created = $.Deferred().then(function() {
|
||||
self._created = undefined;
|
||||
$.when(self.view_form.do_save()).then(function() {
|
||||
self.check_exit();
|
||||
});
|
||||
self.view_form.do_save();
|
||||
});
|
||||
var $cbutton = $buttons.find(".oe_selectcreatepopup-form-close");
|
||||
$cbutton.click(function() {
|
||||
self.check_exit();
|
||||
});
|
||||
});
|
||||
this.dataset.on_create.add(function(data) {
|
||||
self.options.create_function(data).then(function(r) {
|
||||
self.created_elements.push(r.result);
|
||||
if (self._created) {
|
||||
self._created.resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
this.view_form.do_show();
|
||||
},
|
||||
check_exit: function() {
|
||||
@@ -2450,7 +2464,7 @@ openerp.web.form.FormOpenPopup = openerp.web.OldWidget.extend(/** @lends openerp
|
||||
}
|
||||
});
|
||||
|
||||
openerp.web.form.FormOpenDataset = openerp.web.ReadOnlyDataSetSearch.extend({
|
||||
openerp.web.form.FormOpenDataset = openerp.web.ProxyDataSet.extend({
|
||||
read_ids: function() {
|
||||
if (this.fop.options.read_function) {
|
||||
return this.fop.options.read_function.apply(null, arguments);
|
||||
@@ -2536,10 +2550,6 @@ openerp.web.form.FieldBinary = openerp.web.form.Field.extend({
|
||||
this.$element.find('button.oe-binary-file-save').click(this.on_save_as);
|
||||
this.$element.find('.oe-binary-file-clear').click(this.on_clear);
|
||||
},
|
||||
update_dom: function() {
|
||||
this._super.apply(this, arguments);
|
||||
this.$element.find('.oe-binary').toggle(!this.readonly);
|
||||
},
|
||||
human_filesize : function(size) {
|
||||
var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
var i = 0;
|
||||
@@ -2557,12 +2567,10 @@ openerp.web.form.FieldBinary = openerp.web.form.Field.extend({
|
||||
if ($(e.target).val() != '') {
|
||||
this.$element.find('form.oe-binary-form input[name=session_id]').val(this.session.session_id);
|
||||
this.$element.find('form.oe-binary-form').submit();
|
||||
this.toggle_progress();
|
||||
this.$element.find('.oe-binary-progress').show();
|
||||
this.$element.find('.oe-binary').hide();
|
||||
}
|
||||
},
|
||||
toggle_progress: function() {
|
||||
this.$element.find('.oe-binary-progress, .oe-binary').toggle();
|
||||
},
|
||||
on_file_uploaded: function(size, name, content_type, file_base64) {
|
||||
delete(window[this.iframe]);
|
||||
if (size === false) {
|
||||
@@ -2573,7 +2581,8 @@ openerp.web.form.FieldBinary = openerp.web.form.Field.extend({
|
||||
this.on_file_uploaded_and_valid.apply(this, arguments);
|
||||
this.on_ui_change();
|
||||
}
|
||||
this.toggle_progress();
|
||||
this.$element.find('.oe-binary-progress').hide();
|
||||
this.$element.find('.oe-binary').show();
|
||||
},
|
||||
on_file_uploaded_and_valid: function(size, name, content_type, file_base64) {
|
||||
},
|
||||
@@ -2599,6 +2608,10 @@ openerp.web.form.FieldBinary = openerp.web.form.Field.extend({
|
||||
|
||||
openerp.web.form.FieldBinaryFile = openerp.web.form.FieldBinary.extend({
|
||||
template: 'FieldBinaryFile',
|
||||
update_dom: function() {
|
||||
this._super.apply(this, arguments);
|
||||
this.$element.find('.oe-binary-file-set, .oe-binary-file-clear').toggle(!this.readonly);
|
||||
},
|
||||
set_value: function(value) {
|
||||
this._super.apply(this, arguments);
|
||||
var show_value = (value != null && value !== false) ? value : '';
|
||||
@@ -2631,6 +2644,10 @@ openerp.web.form.FieldBinaryImage = openerp.web.form.FieldBinary.extend({
|
||||
this._super.apply(this, arguments);
|
||||
this.$image = this.$element.find('img.oe-binary-image');
|
||||
},
|
||||
update_dom: function() {
|
||||
this._super.apply(this, arguments);
|
||||
this.$element.find('.oe-binary').toggle(!this.readonly);
|
||||
},
|
||||
set_value: function(value) {
|
||||
this._super.apply(this, arguments);
|
||||
this.set_image_maxwidth();
|
||||
|
||||
@@ -1151,7 +1151,8 @@ openerp.web.ListView.Groups = openerp.web.Class.extend( /** @lends openerp.web.L
|
||||
|
||||
var fields = _.pluck(_.select(this.columns, function(x) {return x.tag == "field"}), 'name');
|
||||
var options = { offset: page * limit, limit: limit };
|
||||
dataset.read_slice(fields, options , function (records) {
|
||||
//TODO xmo: investigate why we need to put the setTimeout
|
||||
setTimeout(function() {dataset.read_slice(fields, options , function (records) {
|
||||
if (!self.datagroup.openable) {
|
||||
view.configure_pager(dataset);
|
||||
} else {
|
||||
@@ -1170,7 +1171,7 @@ openerp.web.ListView.Groups = openerp.web.Class.extend( /** @lends openerp.web.L
|
||||
self.records.add(records, {silent: true});
|
||||
list.render();
|
||||
d.resolve(list);
|
||||
});
|
||||
});}, 0);
|
||||
return d.promise();
|
||||
},
|
||||
setup_resequence_rows: function (list, dataset) {
|
||||
|
||||
@@ -68,9 +68,11 @@ db.web.ActionManager = db.web.Widget.extend({
|
||||
},
|
||||
on_url_hashchange: function(url) {
|
||||
var self = this;
|
||||
self.rpc("/web/action/load", { action_id: url.action_id }, function(result) {
|
||||
self.do_action(result.result);
|
||||
});
|
||||
if(url && url.action_id) {
|
||||
self.rpc("/web/action/load", { action_id: url.action_id }, function(result) {
|
||||
self.do_action(result.result);
|
||||
});
|
||||
}
|
||||
},
|
||||
do_action: function(action, on_close) {
|
||||
var type = action.type.replace(/\./g,'_');
|
||||
@@ -771,7 +773,9 @@ db.web.View = db.web.Widget.extend(/** @lends db.web.View# */{
|
||||
var self = this;
|
||||
var result_handler = function () {
|
||||
if (on_closed) { on_closed.apply(null, arguments); }
|
||||
return self.widget_parent.on_action_executed.apply(null, arguments);
|
||||
if (self.widget_parent && self.widget_parent.on_action_executed) {
|
||||
return self.widget_parent.on_action_executed.apply(null, arguments);
|
||||
}
|
||||
};
|
||||
var handler = function (r) {
|
||||
var action = r.result;
|
||||
|
||||
@@ -447,8 +447,8 @@
|
||||
</blockquote>
|
||||
<a class="oe-shortcut-toggle" title="Add / Remove Shortcut..."
|
||||
href="javascript: void(0)"> </a>
|
||||
<h2 class="oe_view_title">
|
||||
<t t-esc="self.action.name"/>
|
||||
<h2 class="oe_view_title" t-if="self.session.debug || self.flags.display_title !==false">
|
||||
<t t-if="self.flags.display_title !==false" t-esc="self.action.name"/>
|
||||
<button t-if="self.session.debug" class="oe_get_xml_view">
|
||||
View#<span></span>
|
||||
</button>
|
||||
|
||||
@@ -7,17 +7,34 @@
|
||||
}
|
||||
.openerp .oe-dashboard-action {
|
||||
margin: 0 0.5em 0.5em 0;
|
||||
padding: 2px;
|
||||
}
|
||||
.openerp .oe-dashboard-action:hover {
|
||||
border: 1px dashed #ccc;
|
||||
padding: 1px;
|
||||
padding: 0px;
|
||||
background-color: white;
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
}
|
||||
|
||||
.openerp .oe-dashboard-action .oe-dashboard-action-header {
|
||||
font-size: 125%;
|
||||
font-size: 85%;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
text-indent: 10px;
|
||||
vertical-align: center;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
background: white url("/web/static/src/img/box-a-header-a.gif") 0% 0% repeat-x;
|
||||
}
|
||||
|
||||
.openerp h2.oe-dashboard-action-header {
|
||||
margin: 0;
|
||||
padding:4px 4px;
|
||||
-moz-border-radius-topleft: 3px;
|
||||
-webkit-border-top-left-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
-moz-border-radius-topright: 3px;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
|
||||
.openerp a.oe-dashboard-action-rename {
|
||||
float: left;
|
||||
padding-right: 4px;
|
||||
@@ -57,6 +74,12 @@
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* Base overwriting */
|
||||
.openerp .oe-listview-content, .openerp .ui-widget-header {
|
||||
border:none !important;
|
||||
padding:0px 3px;
|
||||
}
|
||||
|
||||
/* Layouts */
|
||||
.openerp .oe-dashboard-layout_1 .oe-dashboard-column.index_0 {
|
||||
width: 100%;
|
||||
@@ -234,6 +257,3 @@
|
||||
.openerp .oe-dashboard-action .view-manager-main-content {
|
||||
padding: 2px;
|
||||
}
|
||||
.openerp .oe-dashboard-action-header .ui-icon, .openerp .oe-dashboard-action-header .oe-dashboard-action-rename {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -43,9 +43,6 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({
|
||||
});
|
||||
|
||||
//this.$element.find('a.oe-dashboard-action-rename').live('click', this.on_rename);
|
||||
this.$element.find('.oe-dashboard-action').live('mouseover mouseout', function(event) {
|
||||
$(this).find('.oe-dashboard-action-header .ui-icon, .oe-dashboard-action-header .oe-dashboard-action-rename').toggle(event.type == 'mouseover');
|
||||
});
|
||||
},
|
||||
on_undo: function() {
|
||||
this.rpc('/web/view/undo_custom', {
|
||||
@@ -224,7 +221,8 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({
|
||||
views_switcher : false,
|
||||
action_buttons : false,
|
||||
pager: false,
|
||||
low_profile: true
|
||||
low_profile: true,
|
||||
display_title: false
|
||||
};
|
||||
var am = new openerp.web.ActionManager(this);
|
||||
this.action_managers.push(am);
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<div t-att-data-id="action.attrs.name" class="oe-dashboard-action">
|
||||
<h2 class="oe-dashboard-action-header oe_view_title">
|
||||
<input class="oe-dashboard-action-input" type="text" name="title" value="" style="display: none"/>
|
||||
<t t-esc="action.attrs.string"/>
|
||||
<span class='ui-icon ui-icon-closethick'></span>
|
||||
<span class='ui-icon ui-icon-minusthick oe-dashboard-fold' t-if="!action.attrs.fold"></span>
|
||||
<span class='ui-icon ui-icon-plusthick oe-dashboard-fold' t-if="action.attrs.fold"></span>
|
||||
|
||||
Reference in New Issue
Block a user