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

Bug #867461 reported by Hardik Ansodariya (OpenERP)
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 3

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'

Related branches

Revision history for this message
Hardik Ansodariya (OpenERP) (han-tinyerp) wrote :
Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

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
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Bharat Devnani (Open ERP) (bde-openerp) wrote :

Hello Hardik,

Thanks for reporting, the solution of this bug will be merged in main addons soon. Following are the Revision ID and Number of the proposed branch :

Revision ID : <email address hidden>
Revision Number : 5350

Thanks & Regards,
Devnani Bharat R.

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
qdp (OpenERP) (qdp) wrote :

fix released in revision 5357.

Thanks

Changed in openobject-addons:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.