← Back to team overview

openerp-india team mailing list archive

[Bug 1225860] Re: [7.0] POS sale details report exception when sale order lines contains no taxes

 

Hello,

I am facing this below traceback :

2013-09-16 09:47:54,800 18911 ERROR trnk openerp.service.report: Exception: "'bool' object is not iterable" while evaluating
"repeatIn(gettaxamount(data['form']), 'p')"
Traceback (most recent call last):
  File "/home/tch/workspace/rdtools/server/trunk/openerp/service/report.py", line 92, in go
    result, format = openerp.report.render_report(cr, uid, ids, object, datas, context)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/__init__.py", line 40, in render_report
    return registry['ir.actions.report.xml'].render_report(cr, uid, ids, name, data, context)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/addons/base/ir/ir_actions.py", line 129, in render_report
    return new_report.create(cr, uid, res_ids, data, context)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/report_sxw.py", line 456, in create
    fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/report_sxw.py", line 525, in create_source_pdf
    return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/report_sxw.py", line 547, in create_single_pdf
    pdf = create_doc(etree.tostring(processed_rml),rml_parser.localcontext,logo,title.encode('utf8'))
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/interface.py", line 217, in create_pdf
    obj.render()
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/render/render.py", line 59, in render
    self._result = self._render()
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/render/rml.py", line 41, in _render
    return rml2pdf.parseNode(self.rml, self.localcontext, images=self.bin_datas, path=self.path,title=self.title)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/render/rml2pdf/trml2pdf.py", line 1035, in parseNode
    r.render(fp)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/render/rml2pdf/trml2pdf.py", line 348, in render
    pt_obj.render(el)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/render/rml2pdf/trml2pdf.py", line 1011, in render
    fis += r.render(node_story)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/render/rml2pdf/trml2pdf.py", line 905, in render
    return process_story(node_story)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/render/rml2pdf/trml2pdf.py", line 894, in process_story
    for node in utils._child_get(node_story, self):
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/render/rml2pdf/utils.py", line 48, in _child_get
    for ctx in eval(n.get('rml_loop'),{}, self.localcontext):
  File "/home/tch/workspace/rdtools/server/trunk/openerp/tools/safe_eval.py", line 246, in safe_eval
    return eval(c, globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/home/tch/workspace/rdtools/server/trunk/openerp/report/report_sxw.py", line 331, in repeatIn
    for id in lst:
ValueError: "'bool' object is not iterable" while evaluating
"repeatIn(gettaxamount(data['form']), 'p')"
2013-09-16 09:47:55,147 18911 ERROR trnk openerp.addons.web.http: An exception occured during an http request
Traceback (most recent call last):
  File "/home/tch/workspace/rdtools/web/trunk/addons/web/http.py", line 414, in dispatch
    r = self._call_function(**self.params)
  File "/home/tch/workspace/rdtools/web/trunk/addons/web/http.py", line 174, in _call_function
    return self.func(*args, **kwargs)
  File "/home/tch/workspace/rdtools/web/trunk/addons/web/http.py", line 1053, in nfunc
    return func(*args, **kwargs)
  File "/home/tch/workspace/rdtools/web/trunk/addons/web/controllers/main.py", line 1705, in index
    request.session.db, request.session.uid, request.session.password, report_id)
  File "/home/tch/workspace/rdtools/web/trunk/addons/web/http.py", line 553, in proxy_method
    result = openerp.netsvc.dispatch_rpc(self.service_name, method, args)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/netsvc.py", line 236, in dispatch_rpc
    result = dispatch(method, params)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/service/report.py", line 34, in dispatch
    res = fn(db, uid, *params)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/service/report.py", line 140, in exp_report_get
    return _check_report(report_id)
  File "/home/tch/workspace/rdtools/server/trunk/openerp/service/report.py", line 118, in _check_report
    raise openerp.osv.orm.except_orm(exc.message, exc.traceback)
except_orm: (u'"\'bool\' object is not iterable" while evaluating\n"repeatIn(gettaxamount(data[\'form\']), \'p\')"', (<type 'exceptions.ValueError'>, ValueError(u'"\'bool\' object is not iterable" while evaluating\n"repeatIn(gettaxamount(data[\'form\']), \'p\')"',), <traceback object at 0xb2e200f4>))


** Attachment added: "sale details.png"
   https://bugs.launchpad.net/openobject-addons/+bug/1225860/+attachment/3823415/+files/sale%20details.png

** Changed in: openobject-addons
   Importance: Undecided => Medium

** Changed in: openobject-addons
       Status: New => Confirmed

** Changed in: openobject-addons
     Assignee: (unassigned) => OpenERP R&D Addons Team 3 (openerp-dev-addons3)

** Summary changed:

- [7.0] POS sale details report exception when sale order lines contains no taxes
+ [trunk/7.0] POS sale details report exception when sale order lines contains no taxes

-- 
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/1225860

Title:
  [trunk/7.0] POS sale details report exception when sale order lines
  contains no taxes

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  Addons revno: 9443

  This bus is introduced with this commit:
  http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/revision/9435

  The return value of _get_tax_amount() function is used with repeatIn
  report tag which apparently is not aware how to cope with False value
  (one is returned when no taxes are generated).

  Please find patch attached

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


References