bzr revid: nel@tinyerp.com-20120507151621-1onen7o3mg7bfkf3
This commit is contained in:
Najlaâ
2012-05-07 17:16:21 +02:00
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ module named account_voucher.
'project/analytic_account_demo.xml',
'demo/account_minimal.xml',
'demo/account_invoice_demo.xml',
# 'account_unit_test.xml',
'account_unit_test.xml',
],
'test': [
'test/account_customer_invoice.yml',
+5 -4
View File
@@ -214,11 +214,12 @@ class account_cash_statement(osv.osv):
if self.pool.get('account.journal').browse(cr, uid, vals['journal_id'], context=context).type == 'cash':
open_close = self._get_cash_open_close_box_lines(cr, uid, context)
if vals.get('starting_details_ids', False):
for start in vals.get('starting_details_ids'):
dict_val = start[2]
starting_details_ids = vals.get('starting_details_ids')
for start in starting_details_ids:
dict_val = start[2] or {}
for end in open_close['end']:
if end[2]['pieces'] == dict_val['pieces']:
end[2]['number'] += dict_val['number']
if end[2]['pieces'] == dict_val.get('pieces', 0.0):
end[2]['number'] += dict_val.get('number', 0.0)
vals.update({
# 'ending_details_ids': open_close['start'],
'starting_details_ids': open_close['end']