diff --git a/addons/account/account.py b/addons/account/account.py index 7e0afba3700..bfc16a4c419 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1375,7 +1375,7 @@ class account_move(osv.osv): balance = 0.0 for line in line_ids: if line[2]: - balance += (line[2]['debit'] or 0.00)- (line[2]['credit'] or 0.00) + balance += (line[2].get('debit',0.00)- (line[2].get('credit',0.00))) return {'value': {'balance': balance}} def write(self, cr, uid, ids, vals, context=None): diff --git a/addons/event/event.py b/addons/event/event.py index 64a2b187a5a..747981f854b 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -57,7 +57,7 @@ class event_event(osv.osv): ids = [ids] res = [] - for record in self.browse(cr, uid, ids, context=context) + for record in self.browse(cr, uid, ids, context=context): date = record.date_begin.split(" ")[0] date_end = record.date_end.split(" ")[0] if date != date_end: diff --git a/addons/stock/product.py b/addons/stock/product.py index b8e8ddc4505..2016e25a5f6 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -44,7 +44,7 @@ class product_product(osv.osv): ], ['product_id'], ['product_id']) for move in moves: product_id = move['product_id'][0] - res[product_id]['reception_count'] = move['product_id_count'] + res[product_id]['delivery_count'] = move['product_id_count'] return res def get_product_accounts(self, cr, uid, product_id, context=None):