3
0
Fork 0

[CHG] display an item in the 'More' menu instead of adding a button

7.0
Guewen Baconnier 2013-12-06 13:36:56 +01:00
parent 0e25e20bab
commit 549b31bfa9
2 changed files with 4 additions and 8 deletions

View File

@ -8,9 +8,11 @@ openerp.web_translate_dialog_page = function (instance) {
instance.web.FormView.include({ instance.web.FormView.include({
load_form: function(data) { load_form: function(data) {
var self = this;
this._super(data); this._super(data);
this.$buttons.on('click', '.oe_form_button_translate', this.sidebar.add_items('other', _.compact([
this.guard_active(this.on_button_translate)); self.is_action_enabled('edit') && { label: _t('Translate'), callback: self.on_button_translate },
]));
}, },
on_button_translate: function() { on_button_translate: function() {
var self = this; var self = this;

View File

@ -30,11 +30,5 @@
<button class="oe_form_translate_dialog_cancel_button oe_button">Cancel</button> <button class="oe_form_translate_dialog_cancel_button oe_button">Cancel</button>
</t> </t>
<div t-extend="FormView.buttons">
<t t-jquery="span.oe_form_buttons_view" t-operation="append">
<button type="button" class="oe_button oe_form_button_translate">Translate</button>
</t>
</div>
</templates> </templates>