[FIX] account: account reconciliation JS, return false if not datarecord on click on reconciliation, nothing reconciliation buttons
bzr revid: hmo@tinyerp.com-20120905081142-6zdw8cs919v0l0j8
This commit is contained in:
parent
ef06a2d41a
commit
031ccce150
|
@ -36,6 +36,9 @@ instance.account.extend_form_view = instance.web.FormView.extend({
|
|||
},
|
||||
do_reconcilation:function(event){
|
||||
var self = this
|
||||
if (!self.datarecord.id){
|
||||
return false;
|
||||
}
|
||||
var list_view = this.getParent().views['list'].controller
|
||||
ids = list_view.get_selected_ids()
|
||||
if (ids.length == 0) {
|
||||
|
@ -66,6 +69,9 @@ instance.account.extend_form_view = instance.web.FormView.extend({
|
|||
|
||||
do_nothing_to_reconcile:function(){
|
||||
var self = this;
|
||||
if (!self.datarecord.id){
|
||||
return false;
|
||||
}
|
||||
this.dataset.call(event.target.name, [[self.datarecord.id], self.dataset.context]).then(function() {
|
||||
self.dataset.read_slice().done(function(){
|
||||
self.on_pager_action('next');
|
||||
|
@ -91,6 +97,7 @@ instance.account.extend_form_view = instance.web.FormView.extend({
|
|||
|
||||
on_pager_action: function(action) {
|
||||
var self = this
|
||||
|
||||
if (this.dataset.ids.length == 0){
|
||||
self.datarecord = {}
|
||||
_(this.fields).each(function (field, f) {
|
||||
|
|
Loading…
Reference in New Issue