← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 792030] Re: inherted account.invoice crashes at print

 

Hello,

The problem may be due to following blocktable content:

<blockTable colWidths="297.0,233.0" style="Table_Partner_Address">
      <tr>
        <td>
          <para style="terp_tblheader_General">[[ company.partner_id.name ]] [[ (company.partner_id and company.partner_id.title and company.partner_id.title.name) or '' ]] </para>
    	  <para style="terp_default_8"><b>VAT:</b> [[ (company.partner_id and company.partner_id.vat) or '' ]]</para> 
          <para style="terp_default_8"><b>NRC:</b> [[ (company.partner_id and company.partner_id.nrc) or '']]</para> 
 	  <para style="terp_default_8"><b>Street:</b> [[ (company.partner_id.address and company.partner_id.address[0].street) or '' ]] Nr: [[ (company.partner_id.address and company.partner_id.address[0].street2) or '' ]] </para>
          <para style="terp_default_8"><b>Zip:</b> [[ (company.partner_id.address and company.partner_id.address[0].zip) or '' ]] </para>
	  <para style="terp_default_8"><b>City:</b> [[ (company.partner_id.address and company.partner_id.address[0].city) or '' ]]</para>
          <para style="terp_default_8"><b>Fed. State:</b> [[ (company.partner_id.address and company.partner_id.address[0].state_id and company.partner_id.address[0].state_id.name) or '' ]]</para>           
          <para style="terp_default_8">
            <font color="white"> </font>
          </para>
	 <para style="terp_default_8"><b>Bank:</b> [[ (company.partner_id.bank_ids and company.partner_id.bank_ids[0].bank.name) or '' ]] <b>Succ.</b> [[ (company.partner_id.bank_ids and company.partner_id.bank_ids[0].bank.city) or '' ]]</para>
         <para style="terp_default_8"><b>Account:</b> [[ (company.partner_id.bank_ids and company.partner_id.bank_ids[0].acc_number) or '' ]]</para>
	 <para style="terp_default_8"><b>Bank:</b> [[ (company.partner_id.bank_ids and company.partner_id.bank_ids[1].bank.name) or '' ]] <b>Succ.</b> [[ (company.partner_id.bank_ids and company.partner_id.bank_ids[1].bank.city) or '' ]]</para>
         <para style="terp_default_8"><b>Account:</b> [[ (company.partner_id.bank_ids and company.partner_id.bank_ids[1].acc_number) or '' ]]</para>
	 <para style="terp_default_8"><b>Bank:</b> [[ (company.partner_id.bank_ids and company.partner_id.bank_ids[2].bank.name) or '' ]] <b>Succ.</b> [[ (company.partner_id.bank_ids and company.partner_id.bank_ids[2].bank.city) or '' ]]</para>
         <para style="terp_default_8"><b>Account:</b> [[ (company.partner_id.bank_ids and company.partner_id.bank_ids[2].acc_number) or '' ]]</para>
          <para style="terp_default_8">
            <font color="white"> </font>
          </para>
<!--          <para style="terp_default_8"><b>Tel.:</b> [[ (company.partner_id.address and company.partner_id.address[0].phone) or removeParentNode('para') ]]</para>
          <para style="terp_default_8"><b>Fax:</b> [[ (company.partner_id.address and company.partner_id.address[0].fax) or removeParentNode('para') ]]</para>    -->
          <para style="terp_default_8"><b>Capital Social:</b> [[ (company.capital_social and company.capital_social) or removeParentNode('para') ]] [[company.currency_id.symbol]]</para> 
        </td>
        <td>
          <para style="terp_tblheader_General">[[ (o.partner_id and o.partner_id.name) or '' ]] [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] </para>
          <para style="terp_default_8"><b>VAT:</b> [[ (o.partner_id and o.partner_id.vat) or '' ]]</para>
          <para style="terp_default_8"><b>NRC:</b> [[ (o.partner_id and o.partner_id.nrc) or '' ]]</para>
          <para style="terp_default_8"><b>Street:</b> [[ (o.address_invoice_id and o.address_invoice_id.street) or '' ]] Nr: [[ (o.address_invoice_id and o.address_invoice_id.street2) or '' ]]</para>
          <para style="terp_default_8"><b>Zip:</b> [[ (o.address_invoice_id and o.address_invoice_id.zip) or '' ]] </para>
          <para style="terp_default_8"><b>City:</b> [[ (o.address_invoice_id and o.address_invoice_id.city) or '' ]]</para>

          <para style="terp_default_8"><b>Fed. State:</b> [[ (o.address_invoice_id and o.address_invoice_id.state_id and o.address_invoice_id.state_id.name) or '' ]]</para>	
          <para style="terp_default_8">
            <font color="white"> </font>
          </para>
	  <para style="terp_default_8"><b>Bank:</b> [[ (o.partner_id.bank_ids and o.partner_id.bank_ids[0].bank.name) or '' ]]</para>
 	  <para style="terp_default_8"><b>Account:</b> [[ (o.partner_id.bank_ids and o.partner_id.bank_ids[0].acc_number) or '' ]]</para>
          <para style="terp_default_8">
            <font color="white"> </font>
          </para>
          <para style="terp_default_8"><b>Tel.:</b> [[ (o.address_invoice_id and o.address_invoice_id.phone) or '' ]]</para>
          <para style="terp_default_8"><b>Fax:</b> [[ (o.address_invoice_id and o.address_invoice_id.fax) or '' ]]</para>
        </td>
      </tr>
    </blockTable>

You have used some new fields inside this blocktable so check all new
fields individually.

Thanks.

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

Title:
  inherted account.invoice crashes at print

Status in OpenERP Modules (addons):
  Invalid

Bug description:
  I use a simple module for Romanian invoice localisation found at:
  https://code.launchpad.net/~openerp-romanian-team/openerp-ro/deltatech_invoice

  today I get this when printing and I cannot get around it:
  pydev debugger: warning: psyco not available for speedups (the debugger will still work correctly, but a bit slower)
  pydev debugger: starting
  INFO:server:OpenERP version - 6.0.1
  INFO:server:addons_path - /usr/lib/openerp-server-6.0.1/addons
  INFO:server:database hostname - localhost
  INFO:server:database port - 5432
  INFO:server:database user - openerp
  INFO:server:initialising distributed objects services
  INFO:web-services:starting HTTP service at 0.0.0.0 port 8069
  INFO:web-services:starting HTTPS service at 0.0.0.0 port 8071
  INFO:web-services:Registered XML-RPC over HTTP
  INFO:web-services:starting NET-RPC service at 0.0.0.0 port 8070
  INFO:server:Starting 3 services
  INFO:server:OpenERP server is running, waiting for connections...

   Exception: 
   Traceback (most recent call last):
     File "/usr/lib/openerp-server-6.0.1/service/web_services.py", line 724, in go
       (result, format) = obj.create(cr, uid, ids, datas, context)
     File "/usr/lib/openerp-server-6.0.1/report/report_sxw.py", line 428, in create
       fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
     File "/usr/lib/openerp-server-6.0.1/report/report_sxw.py", line 462, in create_source_pdf
       result = self.create_single_pdf(cr, uid, [obj.id], data, report_xml, context)
     File "/usr/lib/openerp-server-6.0.1/report/report_sxw.py", line 513, in create_single_pdf
       pdf = create_doc(etree.tostring(processed_rml),rml_parser.localcontext,logo,title.encode('utf8'))
     File "/usr/lib/openerp-server-6.0.1/report/interface.py", line 193, in create_pdf
       obj.render()
     File "/usr/lib/openerp-server-6.0.1/report/render/render.py", line 63, in render
       result = self._render()
     File "/usr/lib/openerp-server-6.0.1/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 "/usr/lib/openerp-server-6.0.1/report/render/rml2pdf/trml2pdf.py", line 971, in parseNode
       r.render(fp)
     File "/usr/lib/openerp-server-6.0.1/report/render/rml2pdf/trml2pdf.py", line 303, in render
       pt_obj.render(el)
     File "/usr/lib/openerp-server-6.0.1/report/render/rml2pdf/trml2pdf.py", line 942, in render
       fis += r.render(node_story)
     File "/usr/lib/openerp-server-6.0.1/report/render/rml2pdf/trml2pdf.py", line 861, in render
       return process_story(node_story)
     File "/usr/lib/openerp-server-6.0.1/report/render/rml2pdf/trml2pdf.py", line 854, in process_story
       flow = self._flowable(node)
     File "/usr/lib/openerp-server-6.0.1/report/render/rml2pdf/trml2pdf.py", line 723, in _flowable
       return self._pto(node)
     File "/usr/lib/openerp-server-6.0.1/report/render/rml2pdf/trml2pdf.py", line 713, in _pto
       flow = self._flowable(node)
     File "/usr/lib/openerp-server-6.0.1/report/render/rml2pdf/trml2pdf.py", line 818, in _flowable
       return self.render(node)
     File "/usr/lib/openerp-server-6.0.1/report/render/rml2pdf/trml2pdf.py", line 861, in render
       return process_story(node_story)
     File "/usr/lib/openerp-server-6.0.1/report/render/rml2pdf/trml2pdf.py", line 854, in process_story
       flow = self._flowable(node)
     File "/usr/lib/openerp-server-6.0.1/report/render/rml2pdf/trml2pdf.py", line 777, in _flowable
       return  self._table(node)
     File "/usr/lib/openerp-server-6.0.1/report/render/rml2pdf/trml2pdf.py", line 681, in _table
       assert length == len(node.get('colWidths').split(','))
   AssertionError


References