paying invoice error in client (web) side (account_voucher.py)

Bug #777438 reported by Juan Pablo Levy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web Client
Fix Released
Undecided
OpenERP Publisher's Warranty Team

Bug Description

1) In openerp 6.0.2, web client, trying to pay an invoice (created from sales order or directly)

2) [2011-05-04 16:35:16,614][DEMOSYNCHBASE] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/home/jplevy/baazar-projects/openerp60/server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/osv/osv.py", line 196, in exec_workflow
    res = self.exec_workflow_cr(cr, uid, obj, method, *args)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/osv/osv.py", line 189, in exec_workflow_cr
    return wf_service.trg_validate(uid, obj, args[0], method, cr)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/workflow/wkf_service.py", line 80, in trg_validate
    res2 = instance.validate(cr, id, ident, signal)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/workflow/instance.py", line 48, in validate
    workitem.process(cr, witem, ident, signal, force_running, stack=stack)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/workflow/workitem.py", line 61, in process
    ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/workflow/workitem.py", line 174, in _split_test
    _join_test(cr, t[0], t[1], ident, stack)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/workflow/workitem.py", line 182, in _join_test
    create(cr,[activity], inst_id, ident, stack)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/workflow/workitem.py", line 41, in create
    process(cr, res, ident, stack=stack)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/workflow/workitem.py", line 53, in process
    result = _execute(cr, workitem, activity, ident, stack)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/workflow/workitem.py", line 107, in _execute
    wkf_expr.execute(cr, ident, workitem, activity)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/workflow/wkf_expr.py", line 68, in execute
    return _eval_expr(cr, ident, workitem, activity['action'])
  File "/home/jplevy/baazar-projects/openerp60/server/bin/workflow/wkf_expr.py", line 58, in _eval_expr
    ret = eval(line, env, nocopy=True)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/tools/safe_eval.py", line 284, in safe_eval
    return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/home/jplevy/baazar-projects/openerp60/server/bin/osv/orm.py", line 181, in <lambda>
    return lambda *args, **argv: attr(self._cr, self._uid, [self._id], *args, **argv)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/addons/account_voucher/account_voucher.py", line 559, in proforma_voucher
    self.action_move_line_create(cr, uid, ids, context=context)
  File "/home/jplevy/baazar-projects/openerp60/server/bin/addons/account_voucher/account_voucher.py", line 754, in action_move_line_create
    if not currency_pool.is_zero(cr, uid, inv.currency_id, line_total):
  File "/home/jplevy/baazar-projects/openerp60/server/bin/addons/base/res/res_currency.py", line 90, in is_zero
    return abs(self.round(cr, uid, currency, amount)) < currency.rounding
  File "/home/jplevy/baazar-projects/openerp60/server/bin/addons/base/res/res_currency.py", line 87, in round
    return round(amount / currency.rounding) * currency.rounding
TypeError: unsupported operand type(s) for /: 'float' and 'NoneType'

3) Pay normally as before

4) Linux 10.0.04 LTS, PostgresSql 8.4

5) 6.02 (Stable) revisions: Server: 3416; Web-client: 4592; gtk-client: 1841; addons: 4557; extra-addons: 5428

Thanks in advance,
Juan Pablo

Revision history for this message
DBR (OpenERP) (dbr-openerp) wrote :

Hello,

I have tested Pay Invoice with latest stable code and it's working fine at my end.
I have attached a video for your reference so, Please check and notify us with more information.
Revision Information : [stable-6]
server : 3419, Client : 1842, Addons : 4559, Web : 4593

Thanks.

affects: openobject-addons → openobject-client-web
Changed in openobject-client-web:
status: New → Incomplete
Revision history for this message
Dominique Chabord (dominique-chabord) wrote :

It seems we can reproduce :

http://www.openerp.com/forum/topic24883.html
hope this helps

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Juan,

This has been fixed and will be available for 6.0.3.

Thanks.

Changed in openobject-client-web:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
milestone: none → 6.0.3
status: Incomplete → Fix Released
Revision history for this message
Juan Pablo Levy (jplevy) wrote :

Dominique and Jay,

Thanks a lot.

It worked fine with server : 3419, Client : 1842, Addons : 4559, Web : 4593

Bye, thanks
Juan Pablo

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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