[11.0][IMP] account_financial_report - foreign_currency
This commit is contained in:
@@ -62,14 +62,13 @@ var report_backend = Widget.extend(ControlPanelMixin, {
|
||||
},
|
||||
// Updates the control panel and render the elements that have yet to be rendered
|
||||
update_cp: function() {
|
||||
if (!this.$buttons) {
|
||||
|
||||
if (this.$buttons) {
|
||||
var status = {
|
||||
breadcrumbs: this.actionManager.get_breadcrumbs(),
|
||||
cp_content: {$buttons: this.$buttons},
|
||||
};
|
||||
return this.update_control_panel(status);
|
||||
}
|
||||
var status = {
|
||||
breadcrumbs: this.actionManager.get_breadcrumbs(),
|
||||
cp_content: {$buttons: this.$buttons},
|
||||
};
|
||||
return this.update_control_panel(status);
|
||||
},
|
||||
do_show: function() {
|
||||
this._super();
|
||||
|
||||
@@ -2,7 +2,6 @@ odoo.define('account_financial_report.account_financial_report_widget', function
|
||||
(require) {
|
||||
'use strict';
|
||||
|
||||
var core = require('web.core');
|
||||
var Widget = require('web.Widget');
|
||||
|
||||
|
||||
@@ -10,8 +9,10 @@ var accountFinancialReportWidget = Widget.extend({
|
||||
events: {
|
||||
'click .o_account_financial_reports_web_action': 'boundLink',
|
||||
'click .o_account_financial_reports_web_action_multi': 'boundLinkmulti',
|
||||
'click .o_account_financial_reports_web_action_monetary': 'boundLinkMonetary',
|
||||
'click .o_account_financial_reports_web_action_monetary_multi': 'boundLinkMonetarymulti',
|
||||
},
|
||||
init: function(parent) {
|
||||
init: function() {
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
start: function() {
|
||||
@@ -39,6 +40,28 @@ var accountFinancialReportWidget = Widget.extend({
|
||||
target: 'current'
|
||||
});
|
||||
},
|
||||
boundLinkMonetary: function(e) {
|
||||
var res_model = $(e.target.parentElement).data('res-model');
|
||||
var res_id = $(e.target.parentElement).data('active-id');
|
||||
return this.do_action({
|
||||
type: 'ir.actions.act_window',
|
||||
res_model: res_model,
|
||||
res_id: res_id,
|
||||
views: [[false, 'form']],
|
||||
target: 'current'
|
||||
});
|
||||
},
|
||||
boundLinkMonetarymulti: function(e) {
|
||||
var res_model = $(e.target.parentElement).data('res-model');
|
||||
var domain = $(e.target.parentElement).data('domain');
|
||||
return this.do_action({
|
||||
type: 'ir.actions.act_window',
|
||||
res_model: res_model,
|
||||
domain: domain,
|
||||
views: [[false, "list"], [false, "form"]],
|
||||
target: 'current'
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
return accountFinancialReportWidget;
|
||||
|
||||
Reference in New Issue
Block a user