You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
928 B

  1. odoo.define('account_financial_report.account_financial_report_widget', function
  2. (require) {
  3. 'use strict';
  4. var core = require('web.core');
  5. var Widget = require('web.Widget');
  6. var QWeb = core.qweb;
  7. var _t = core._t;
  8. var accountFinancialReportWidget = Widget.extend({
  9. events: {
  10. 'click .o_account_financial_reports_web_action': 'boundLink',
  11. },
  12. init: function(parent) {
  13. this._super.apply(this, arguments);
  14. },
  15. start: function() {
  16. return this._super.apply(this, arguments);
  17. },
  18. boundLink: function(e) {
  19. var res_model = $(e.target).data('res-model')
  20. var res_id = $(e.target).data('active-id')
  21. return this.do_action({
  22. type: 'ir.actions.act_window',
  23. res_model: res_model,
  24. res_id: res_id,
  25. views: [[false, 'form']],
  26. target: 'current'
  27. });
  28. },
  29. });
  30. return accountFinancialReportWidget;
  31. });