Added mark as reconciled

bzr revid: nicolas.vanhoren@openerp.com-20120920162257-njbnth2t30jranvx
This commit is contained in:
niv-openerp 2012-09-20 18:22:57 +02:00
parent a79bc9be12
commit 4dfc435b09
3 changed files with 19 additions and 3 deletions

View File

@ -3,3 +3,8 @@
border-bottom: 1px solid #CACACA;
padding: 5px;
}
.openerp .oe_account_reconciliation button {
margin-top: 3px;
margin-bottom: 3px;
}

View File

@ -27,6 +27,9 @@ openerp.account = function (instance) {
this.$(".oe_account_recon_reconcile").click(function() {
self.reconcile();
});
this.$(".oe_account_recom_mark_as_reconciled").click(function() {
self.mark_as_reconciled();
});
}
return tmp;
},
@ -86,6 +89,13 @@ openerp.account = function (instance) {
});
});
},
mark_as_reconciled: function() {
var self = this;
var id = self.partners[self.current_partner][0];
new instance.web.Model("res.partner").call("mark_as_reconciled", [[id]]).pipe(function() {
self.do_search(self.last_domain, self.last_context, self.last_group_by);
});
},
});
};

View File

@ -10,12 +10,13 @@
</t>
<t t-if="widget.current_partner !== null">
<div>
<a class="oe_account_recon_previous" href="javascript:void(0)">&lt;</a>
<button class="oe_account_recon_previous oe_button" href="javascript:void(0)">&lt;</button>
<t t-esc="'' + widget.partners[widget.current_partner][1] + ' (' + (widget.current_partner + 1) + '/' + widget.partners.length + ')'"/>
<a class="oe_account_recon_next" href="javascript:void(0)">&gt;</a>
<button class="oe_account_recon_next oe_button" href="javascript:void(0)">&gt;</button>
</div>
<div>
<a class="oe_account_recon_reconcile" href="javascript:void(0)">Reconcile</a>
<button class="oe_account_recon_reconcile oe_button oe_highlight" href="javascript:void(0)">Reconcile</button>
<button class="oe_account_recom_mark_as_reconciled oe_button oe_highlight" href="javascript:void(0)">Nothing to reconcile</button>
</div>
</t>
</div>