← Back to team overview

openerp-india team mailing list archive

[Bug 1012486] Re: [6.1] Opening new cash statement getting errors

 

You should check this code.
/home/erp/openerp/addons/account/account_cash_statement.py", line 222

If you do like this:
starting_details_ids = [[5, False, False], [0, False, {'subtotal': False, 'number': 0, 'pieces': 1}], [0, False, {'subtotal': False, 'number': 0, 'pieces': 2}], [0, False, {'subtotal': False, 'number': 0, 'pieces': 5}], [0, False, {'subtotal': False, 'number': 0, 'pieces': 10}], [0, False, {'subtotal': False, 'number': 0, 'pieces': 20}], [0, False, {'subtotal': False, 'number': 0, 'pieces': 50}], [0, False, {'subtotal': False, 'number': 0, 'pieces': 100}], [0, False, {'subtotal': False, 'number': 0, 'pieces': 500}]]

for start in starting_details_ids:
    dict_val = start[2] # first time this will be False
    print dict_val['pieces']

Then you will get errors.

I didn't do any customization.

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1012486

Title:
  [6.1] Opening new cash statement getting errors

Status in OpenERP Addons (modules):
  Incomplete

Bug description:
  
  File "/home/erp/openerp/addons/account/account_cash_statement.py", line 222, in create
      if end[2]['pieces'] == dict_val['pieces']:
  TypeError: 'bool' object has no attribute '__getitem__'

  I checked vals variable in create method. value of key
  starting_detail_ids seems wrong

  'starting_details_ids': [[5, False, False], [0, False, {'subtotal':
  False, 'number': 0, 'pieces': 1}], [0, False, {'subtotal': False,
  'number': 0, 'pieces': 2}], [0, False, {'subtotal': False, 'number':
  0, 'pieces': 5}], [0, False, {'subtotal': False, 'number': 0,
  'pieces': 10}], [0, False, {'subtotal': False, 'number': 0, 'pieces':
  20}], [0, False, {'subtotal': False, 'number': 0, 'pieces': 50}], [0,
  False, {'subtotal': False, 'number': 0, 'pieces': 100}], [0, False,
  {'subtotal': False, 'number': 0, 'pieces': 500}]],

  First item is [5, False, False]. This happens only in web. On gtk-
  client this problem does not happens.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1012486/+subscriptions


References