[IMP] account: usability of bank statement reconciliation widget
* add a link to create bank reconciliation model if none is defined yet
This commit is contained in:
@@ -1105,6 +1105,7 @@ var bankStatementReconciliation = abstractReconciliation.extend({
|
||||
"keyup .change_statement_name_field": "changeStatementNameFieldHandler",
|
||||
"click .change_statement_name_button": "changeStatementButtonClickHandler",
|
||||
"click .show_more": "showMoreButtonClickHandler",
|
||||
"click .goto_create_preset": "goToCreatePreset",
|
||||
}, abstractReconciliation.prototype.events),
|
||||
|
||||
init: function(parent, context) {
|
||||
@@ -1580,6 +1581,15 @@ var bankStatementReconciliation = abstractReconciliation.extend({
|
||||
else
|
||||
this.$(".show_more").hide();
|
||||
},
|
||||
|
||||
goToCreatePreset: function() {
|
||||
this.action_manager.do_action({
|
||||
type: 'ir.actions.act_window',
|
||||
res_model: 'account.reconcile.model',
|
||||
views: [[false, 'form']],
|
||||
target: 'current'
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
var bankStatementReconciliationLine = abstractReconciliationLine.extend({
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
<table></table>
|
||||
</div>
|
||||
<div class="action_pane create">
|
||||
<div t-if="!presets">
|
||||
<p style="color: #bbb;">You did not configure any reconcile model yet, you can do it <a style="cursor: pointer;" class="goto_create_preset">there</a>.</p>
|
||||
</div>
|
||||
<div class="quick_add" t-att-style="(!presets ? 'display: none' : undefined)">
|
||||
<div class="btn-group btn-group-sm presets_container"><t t-raw="presets" /></div>
|
||||
<div class="dropdown presets_config">
|
||||
|
||||
Reference in New Issue
Block a user