Divide by zero when validating customer invoice

Bug #663402 reported by Jim Norman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
JMA(Open ERP)

Bug Description

The following traceback is experienced upon creating an invoice, adding a line and clicking "Validate": Clicking on "Compute Taxes" prior to "Validate" has no effect - the amounts for the invoice are unchanged.

Environment Information :
System : Linux-2.6.32-25-generic-x86_64-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-25-generic
Operating System Version : #44-Ubuntu SMP Fri Sep 17 20:05:27 UTC 2010
Operating System Architecture : 64bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.0-rc1
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/opt/oerpRC1/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/opt/oerpRC1/server/bin/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/opt/oerpRC1/server/bin/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/oerpRC1/server/bin/osv/osv.py", line 160, in exec_workflow
    res = self.exec_workflow_cr(cr, uid, obj, method, *args)
  File "/opt/oerpRC1/server/bin/osv/osv.py", line 153, in exec_workflow_cr
    return wf_service.trg_validate(uid, obj, args[0], method, cr)
  File "/opt/oerpRC1/server/bin/workflow/wkf_service.py", line 80, in trg_validate
    res2 = instance.validate(cr, id, ident, signal)
  File "/opt/oerpRC1/server/bin/workflow/instance.py", line 48, in validate
    workitem.process(cr, witem, ident, signal, force_running, stack=stack)
  File "/opt/oerpRC1/server/bin/workflow/workitem.py", line 61, in process
    ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
  File "/opt/oerpRC1/server/bin/workflow/workitem.py", line 174, in _split_test
    _join_test(cr, t[0], t[1], ident, stack)
  File "/opt/oerpRC1/server/bin/workflow/workitem.py", line 182, in _join_test
    create(cr,[activity], inst_id, ident, stack)
  File "/opt/oerpRC1/server/bin/workflow/workitem.py", line 41, in create
    process(cr, res, ident, stack=stack)
  File "/opt/oerpRC1/server/bin/workflow/workitem.py", line 53, in process
    result = _execute(cr, workitem, activity, ident, stack)
  File "/opt/oerpRC1/server/bin/workflow/workitem.py", line 107, in _execute
    wkf_expr.execute(cr, ident, workitem, activity)
  File "/opt/oerpRC1/server/bin/workflow/wkf_expr.py", line 68, in execute
    return _eval_expr(cr, ident, workitem, activity['action'])
  File "/opt/oerpRC1/server/bin/workflow/wkf_expr.py", line 58, in _eval_expr
    ret = eval(line, env, nocopy=True)
  File "/opt/oerpRC1/server/bin/tools/safe_eval.py", line 271, in safe_eval
    return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/opt/oerpRC1/server/bin/osv/orm.py", line 177, in <lambda>
    return lambda *args, **argv: attr(self._cr, self._uid, [self._id], *args, **argv)
  File "/opt/openerp/addons/account/invoice.py", line 833, in action_move_create
    total_fixed = (total_fixed * 100) / inv.amount_total
ZeroDivisionError: float division

6.0RC1

Tags: 6.0rc1

Related branches

Revision history for this message
Jim Norman (jim-jsnorman) wrote :

The problem only exists with 6.0RC1 download, and may be due to a .openerp_serverrc which references a different path. The download from launchpad works fine.

Changed in openobject-addons:
assignee: nobody → JMA(Open ERP) (jma-openerp)
Changed in openobject-addons:
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Changed in openobject-addons:
milestone: none → 6.0
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Thanks for posting.
It has been fixed by revision 4443 <email address hidden>.

Changed in openobject-addons:
status: In Progress → Fix Released
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.