[FIX] Issue with py.eval if no options passed.
bzr revid: vta@openerp.com-20121107104933-a60t27t1hjyu368f
This commit is contained in:
parent
4b0d99d6c8
commit
064003797e
|
@ -3162,7 +3162,10 @@ instance.web.form.Many2OneButton = instance.web.form.AbstractField.extend({
|
|||
if (this.$button) {
|
||||
this.$button.remove();
|
||||
}
|
||||
var options =py.eval(this.node.attrs.options);
|
||||
var options = {};
|
||||
try {
|
||||
options = py.eval(this.node.attrs.options);
|
||||
} catch (e) {}
|
||||
if (options.label) {
|
||||
this.string = this.get('value') ? _t(options.label.edit) : _t(options.label.create);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue