Browse Source
[IMP] account_financial_reports: Several improvements:
[IMP] account_financial_reports: Several improvements:
* Move to less files to compile variables * hide contacts on partner * Add reports to res partner actions * initialize wizard from context * initialize wizard by current fiscal yearpull/749/head
Iryna Vushnevska
6 years ago
committed by
João Marques
26 changed files with 436 additions and 185 deletions
-
10account_financial_report/i18n/account_financial_report.pot
-
11account_financial_report/i18n/ar.po
-
10account_financial_report/i18n/ca.po
-
12account_financial_report/i18n/de.po
-
12account_financial_report/i18n/es.po
-
10account_financial_report/i18n/fr.po
-
10account_financial_report/i18n/hr_HR.po
-
11account_financial_report/i18n/it.po
-
11account_financial_report/i18n/nl.po
-
10account_financial_report/i18n/nl_NL.po
-
10account_financial_report/i18n/pt.po
-
11account_financial_report/i18n/ro.po
-
1account_financial_report/models/account_move_line.py
-
1account_financial_report/report/open_items.py
-
183account_financial_report/static/src/js/account_financial_report_backend.js
-
126account_financial_report/static/src/js/account_financial_report_widgets.js
-
0account_financial_report/static/src/less/report.less
-
54account_financial_report/tests/test_general_ledger.py
-
20account_financial_report/tests/test_open_items.py
-
2account_financial_report/view/report_template.xml
-
4account_financial_report/wizard/aged_partner_balance_wizard.py
-
48account_financial_report/wizard/general_ledger_wizard.py
-
13account_financial_report/wizard/general_ledger_wizard_view.xml
-
24account_financial_report/wizard/open_items_wizard.py
-
13account_financial_report/wizard/open_items_wizard_view.xml
-
4account_financial_report/wizard/trial_balance_wizard.py
@ -1,69 +1,73 @@ |
|||
odoo.define('account_financial_report.account_financial_report_widget', function |
|||
(require) { |
|||
'use strict'; |
|||
'use strict'; |
|||
|
|||
var Widget = require('web.Widget'); |
|||
var Widget = require('web.Widget'); |
|||
|
|||
|
|||
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() { |
|||
this._super.apply(this, arguments); |
|||
}, |
|||
start: function() { |
|||
return this._super.apply(this, arguments); |
|||
}, |
|||
boundLink: function(e) { |
|||
var res_model = $(e.target).data('res-model'); |
|||
var res_id = $(e.target).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' |
|||
}); |
|||
}, |
|||
boundLinkmulti: function(e) { |
|||
var res_model = $(e.target).data('res-model'); |
|||
var domain = $(e.target).data('domain'); |
|||
return this.do_action({ |
|||
type: 'ir.actions.act_window', |
|||
res_model: res_model, |
|||
domain: domain, |
|||
views: [[false, "list"], [false, "form"]], |
|||
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' |
|||
}); |
|||
}, |
|||
}); |
|||
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 () { |
|||
this._super.apply(this, arguments); |
|||
}, |
|||
start: function () { |
|||
return this._super.apply(this, arguments); |
|||
}, |
|||
boundLink: function (e) { |
|||
var res_model = $(e.target).data('res-model'); |
|||
var res_id = $(e.target).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', |
|||
}); |
|||
}, |
|||
boundLinkmulti: function (e) { |
|||
var res_model = $(e.target).data('res-model'); |
|||
var domain = $(e.target).data('domain'); |
|||
return this.do_action({ |
|||
type: 'ir.actions.act_window', |
|||
res_model: res_model, |
|||
domain: domain, |
|||
views: [[false, "list"], [false, "form"]], |
|||
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; |
|||
return accountFinancialReportWidget; |
|||
|
|||
}); |
Write
Preview
Loading…
Cancel
Save
Reference in new issue