[IMP] code clean up + fix crash when dataset has no value

bzr revid: rgaopenerp-20120821083942-d032uvt13ij3jadi
This commit is contained in:
RGA(OpenERP) 2012-08-21 14:09:42 +05:30
parent 3a4a7ddd0e
commit 161cb3e8b0
2 changed files with 5 additions and 4 deletions

View File

@ -19,8 +19,6 @@
#
##############################################################################
import time
from datetime import datetime
import tools
from osv import fields,osv

View File

@ -74,12 +74,15 @@ instance.account.extend_form_view = instance.web.FormView.extend({
},
do_nothing_to_reconcile:function(){
self = this
var self = this
if (!_.isEmpty(this.dataset.ids)){
this.dataset.call(event.target.name, [[self.datarecord.id], self.dataset.context]).then(function() {
self.dataset.read_slice().done(function(){
self.on_pager_action('first');
if (!_.isEmpty(self.dataset.ids))
self.on_pager_action('first');
});
})
}
},
do_update_pager: function(hide_index) {