diff options
| author | Stephane Wirtel <stw@openerp.com> | 2012-09-06 16:55:20 +0200 |
|---|---|---|
| committer | Stephane Wirtel <stw@openerp.com> | 2012-09-06 16:55:20 +0200 |
| commit | 58fe30e520f3f5d593b5129b2a3f99bc72359ec5 (patch) | |
| tree | efa5795307bc7a37ddd1bc83fc2787439c6a41c5 | |
| parent | f3bceb20054bcc95074371f43ceb141f2fbe5183 (diff) | |
| parent | 92d66cea29263b4613eb28c00525b63d138b3443 (diff) | |
[MERGE] stock: fix the issue of counting of Deliveries
[MERGE] account: fix the KeyError in the lines of journal.entry
bzr revid: stw@openerp.com-20120906145520-twnqeb3wyezarcnx
| -rw-r--r-- | addons/account/account.py | 2 | ||||
| -rw-r--r-- | addons/event/event.py | 2 | ||||
| -rw-r--r-- | addons/stock/product.py | 2 |
3 files changed, 3 insertions, 3 deletions
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): |
