Error appear due to changes made on voucher (now currency_id field type
is fields.related ), so we are not able to access its value in method
_check_amount. We can fix it by using bank statement's currency.

Thanks.
Mustufa

** Changed in: openobject-addons
    Milestone: None => 6.1

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/867461

Title:
  in bank statement form when i tried to import invoice from button
  import invoices

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  Accounting > cash and bank > bank statment >import invoice(button) > add > ok
  #in bank statement form when i tried to import invoice from button import 
invoices i got this Trace back 

  Traceback (most recent call last):
    File "/home/han/rdtool/server/trunk/openerp/osv/osv.py", line 120, in 
wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/han/rdtool/server/trunk/openerp/osv/osv.py", line 172, in 
execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/han/rdtool/server/trunk/openerp/osv/osv.py", line 163, in 
execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File 
"/home/han/rdtool/addons/trunk/account_voucher/wizard/account_statement_from_invoice.py",
 line 117, in populate_statement
      }, context=context)
    File "/home/han/rdtool/server/trunk/openerp/osv/orm.py", line 3991, in 
create
      self._validate(cr, user, [id_new], context)
    File "/home/han/rdtool/server/trunk/openerp/osv/orm.py", line 1366, in 
_validate
      if not fun(self, cr, uid, ids):
    File "/home/han/rdtool/addons/trunk/account_voucher/account_voucher.py", 
line 1059, in _check_amount
      if not self.pool.get('res.currency').is_zero(cr, uid, 
obj.voucher_id.currency_id, diff):
    File 
"/home/han/rdtool/server/trunk/openerp/addons/base/res/res_currency.py", line 
121, in is_zero
      return abs(self.round(cr, uid, currency, amount)) < currency.rounding
    File 
"/home/han/rdtool/server/trunk/openerp/addons/base/res/res_currency.py", line 
118, in round
      return round(amount / currency.rounding) * currency.rounding
  TypeError: unsupported operand type(s) for /: 'float' and 'NoneType'

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

_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to