← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 690453] Re: [6.0RC1] Can't print Purchase Orders; get "'NoneType' object has no attribute 'Image'"

 

No custom code at all.
Full installation was done as per:
https://powerphil.wordpress.com/2010/12/01/how-to-install-openerp-6-on-centos/

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

Title:
  [6.0RC1] Can't print Purchase Orders; get "'NoneType' object has no attribute 'Image'"

Status in OpenObject Addons Modules:
  Incomplete

Bug description:
  Clicked the "Print" button on the Purchase Order form; got the following message in an alert box (not an exception box, but the little pop-up window with an exclamation mark in a triangle):

'NoneType' object has no attribute 'Image'

(<type 'exceptions.AttributeError'>, AttributeError ("'NoneType' object has no attribute 'Image'",), <traceback object at 0xd33eb1c>)


Setup:

Server: OpenERP 6.0RC1 on Centos 5.5 with Postgres 8.4 and Python 2.6
Client: OpenERP - GTK Client - v6.0.0-rc1-1

Note that this looks like the same exception reported in bug https://bugs.launchpad.net/openobject-addons/+bug/690031
______________________________________________
How to reproduce in detail:

1. Create new database. Do not install demo data.

2. Install these Applications:
    - Invoicing
    - Purchase Management
    - Sales Management
    - Accounting and Finance

3. Select Generic Chart of Accounts.

4. At "Configure your Purchases Management Application", ticked "Purchase Requisition".

5. At "Configure your Sales Management Application", didn't tick anything.

6. Skipped configuring MRP.

7. At "Configure your Accounting Application", did NOT tick "Anglo Saxon Acccounting"; just ticked "Supplies Payment Management". 

8. Configured Sales Order Logistics: Direct Delivery, Invoice Based on Deliveries, Picking List and Delivery Order.

9. Created a customer, supplier and a product.

10. Created a purchase order. Hit "Save".

11. Click the "Print" button on the Purchase Order form.

Also get the same error if hit the print buttons in the right-hand-side action bar to print "Request for Quotation" or "Purchase Order".

These modules are installed:
_____________________________________________________

Name	Category	Short Description	Author	Latest version	Installed version	State	
account	Accounting	Accounting and Financial Management	OpenERP SA	6.0.1.1	6.0.1.1	installed	
account_accountant	Accounting	Accountant	OpenERP SA	6.0.1.1	6.0.1.1	installed	
account_payment	Payment	Payment Management	OpenERP SA	6.0.1.1	6.0.1.1	installed	
account_voucher	Accounting	Accounting Voucher Entries	OpenERP SA	6.0.1.0	6.0.1.0	installed	
analytic	Projects & Services	Analytic Account	OpenERP SA	6.0.1.1	6.0.1.1	installed	
base	Base	Base	OpenERP SA	6.0.1.2	6.0.1.2	installed	
base_setup	Base	Base Setup	OpenERP SA	6.0.1.0	6.0.1.0	installed	
board	Base	Dashboard main module	OpenERP SA	6.0.1.0	6.0.1.0	installed	
decimal_precision	Others	Decimal Precision Configuration	OpenERP SA	6.0.0.1	6.0.0.1	installed	
mrp	Production	Manufacturing Resource Planning	OpenERP SA	6.0.1.1	6.0.1.1	installed	
process	Base	Enterprise Process	OpenERP SA	6.0.1.0	6.0.1.0	installed	
procurement	Production	Procurements	OpenERP SA	6.0.1.0	6.0.1.0	installed	
product	Inventory Control	Products & Pricelists	OpenERP SA	6.0.1.1	6.0.1.1	installed	
purchase	Sales & Purchases	Purchase Management	OpenERP SA	6.0.1.1	6.0.1.1	installed	
purchase_requisition	Sales & Purchases	Purchase - Purchase Requisition	OpenERP SA	6.0.0.1	6.0.0.1	installed	
resource	Projects & Services	Resource	OpenERP SA	6.0.1.1	6.0.1.1	installed	
sale	Sales & Purchases	Sales Management	OpenERP SA	6.0.1.0	6.0.1.0	installed	
stock	Inventory Control	Inventory Management	OpenERP SA	6.0.1.1	6.0.1.1	installed	
_____________________________________________________

Excerpt from server log file:

[2010-12-15 11:59:58,227][?] DEBUG_RPC:service:'report'
[2010-12-15 11:59:58,227][?] DEBUG_RPC:method:'report'
[2010-12-15 11:59:58,228][?] DEBUG_RPC:params:['openerp6basic',
[2010-12-15 11:59:58,229][?] DEBUG_RPC:params: 1,
[2010-12-15 11:59:58,229][?] DEBUG_RPC:params: '*',
[2010-12-15 11:59:58,229][?] DEBUG_RPC:params: u'purchase.order',
[2010-12-15 11:59:58,229][?] DEBUG_RPC:params: [1L],
[2010-12-15 11:59:58,229][?] DEBUG_RPC:params: {'id': 1L, 'model': 'purchase.order', 'report_type': 'pdf'},
[2010-12-15 11:59:58,229][?] DEBUG_RPC:params: {'active_id': 1L,
[2010-12-15 11:59:58,229][?] DEBUG_RPC:params:  'active_ids': [1L],
[2010-12-15 11:59:58,230][?] DEBUG_RPC:params:  'active_model': 'purchase.order',
[2010-12-15 11:59:58,230][?] DEBUG_RPC:params:  'contact_display': 'partner',
[2010-12-15 11:59:58,230][?] DEBUG_RPC:params:  'department_id': False,
[2010-12-15 11:59:58,230][?] DEBUG_RPC:params:  'lang': u'en_US',
[2010-12-15 11:59:58,230][?] DEBUG_RPC:params:  'project_id': False,
[2010-12-15 11:59:58,230][?] DEBUG_RPC:params:  'search_default_approved': 1,
[2010-12-15 11:59:58,230][?] DEBUG_RPC:params:  'search_default_create_uid': 1,
[2010-12-15 11:59:58,230][?] DEBUG_RPC:params:  'section_id': False,
[2010-12-15 11:59:58,230][?] DEBUG_RPC:params:  'tz': False}]
[2010-12-15 11:59:58,231][openerp6basic] DEBUG_RPC_ANSWER:result:1
[2010-12-15 11:59:58,395][openerp6basic] ERROR:web-services:[01]: Exception: 'NoneType' object has no attribute 'Image'
[2010-12-15 11:59:58,396][openerp6basic] ERROR:web-services:[02]: Traceback (most recent call last):
[2010-12-15 11:59:58,396][openerp6basic] ERROR:web-services:[03]:   File "/usr/lib/python2.6/site-packages/openerp-server/service/web_services.py", line 711, in go
[2010-12-15 11:59:58,396][openerp6basic] ERROR:web-services:[04]:     (result, format) = obj.create(cr, uid, ids, datas, context)
[2010-12-15 11:59:58,396][openerp6basic] ERROR:web-services:[05]:   File "/usr/lib/python2.6/site-packages/openerp-server/report/report_sxw.py", line 399, in create
[2010-12-15 11:59:58,396][openerp6basic] ERROR:web-services:[06]:     fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
[2010-12-15 11:59:58,396][openerp6basic] ERROR:web-services:[07]:   File "/usr/lib/python2.6/site-packages/openerp-server/report/report_sxw.py", line 462, in create_source_pdf
[2010-12-15 11:59:58,396][openerp6basic] ERROR:web-services:[08]:     return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
[2010-12-15 11:59:58,397][openerp6basic] ERROR:web-services:[09]:   File "/usr/lib/python2.6/site-packages/openerp-server/report/report_sxw.py", line 484, in create_single_pdf
[2010-12-15 11:59:58,397][openerp6basic] ERROR:web-services:[10]:     pdf = create_doc(etree.tostring(processed_rml),rml_parser.localcontext,logo,title.encode('utf8'))
[2010-12-15 11:59:58,397][openerp6basic] ERROR:web-services:[11]:   File "/usr/lib/python2.6/site-packages/openerp-server/report/interface.py", line 190, in create_pdf
[2010-12-15 11:59:58,397][openerp6basic] ERROR:web-services:[12]:     obj.render()
[2010-12-15 11:59:58,397][openerp6basic] ERROR:web-services:[13]:   File "/usr/lib/python2.6/site-packages/openerp-server/report/render/render.py", line 49, in render
[2010-12-15 11:59:58,397][openerp6basic] ERROR:web-services:[14]:     result = self._render()
[2010-12-15 11:59:58,397][openerp6basic] ERROR:web-services:[15]:   File "/usr/lib/python2.6/site-packages/openerp-server/report/render/rml.py", line 42, in _render
[2010-12-15 11:59:58,397][openerp6basic] ERROR:web-services:[16]:     return rml2pdf.parseNode(self.rml, self.localcontext, images=self.bin_datas, path=self.path,title=self.title)
[2010-12-15 11:59:58,398][openerp6basic] ERROR:web-services:[17]:   File "/usr/lib/python2.6/site-packages/openerp-server/report/render/rml2pdf/trml2pdf.py", line 892, in parseNode
[2010-12-15 11:59:58,398][openerp6basic] ERROR:web-services:[18]:     r.render(fp)
[2010-12-15 11:59:58,398][openerp6basic] ERROR:web-services:[19]:   File "/usr/lib/python2.6/site-packages/openerp-server/report/render/rml2pdf/trml2pdf.py", line 273, in render
[2010-12-15 11:59:58,398][openerp6basic] ERROR:web-services:[20]:     pt_obj.render(el)
[2010-12-15 11:59:58,398][openerp6basic] ERROR:web-services:[21]:   File "/usr/lib/python2.6/site-packages/openerp-server/report/render/rml2pdf/trml2pdf.py", line 880, in render
[2010-12-15 11:59:58,398][openerp6basic] ERROR:web-services:[22]:     self.doc_tmpl.build(fis)
[2010-12-15 11:59:58,398][openerp6basic] ERROR:web-services:[23]:   File "/usr/lib/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 877, in build
[2010-12-15 11:59:58,399][openerp6basic] ERROR:web-services:[24]:     self.clean_hanging()
[2010-12-15 11:59:58,399][openerp6basic] ERROR:web-services:[25]:   File "/usr/lib/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 510, in clean_hanging
[2010-12-15 11:59:58,399][openerp6basic] ERROR:web-services:[26]:     self.handle_flowable(self._hanging)
[2010-12-15 11:59:58,399][openerp6basic] ERROR:web-services:[27]:   File "/usr/lib/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 757, in handle_flowable
[2010-12-15 11:59:58,399][openerp6basic] ERROR:web-services:[28]:     f.apply(self)
[2010-12-15 11:59:58,399][openerp6basic] ERROR:web-services:[29]:   File "/usr/lib/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 140, in apply
[2010-12-15 11:59:58,399][openerp6basic] ERROR:web-services:[30]:     getattr(doc,arn)(*args)
[2010-12-15 11:59:58,399][openerp6basic] ERROR:web-services:[31]:   File "/usr/lib/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 535, in handle_pageBegin
[2010-12-15 11:59:58,400][openerp6basic] ERROR:web-services:[32]:     self.pageTemplate.onPage(self.canv,self)
[2010-12-15 11:59:58,400][openerp6basic] ERROR:web-services:[33]:   File "/usr/lib/python2.6/site-packages/openerp-server/report/render/rml2pdf/trml2pdf.py", line 528, in render
[2010-12-15 11:59:58,400][openerp6basic] ERROR:web-services:[34]:     cnv.render(self.node)
[2010-12-15 11:59:58,400][openerp6basic] ERROR:web-services:[35]:   File "/usr/lib/python2.6/site-packages/openerp-server/report/render/rml2pdf/trml2pdf.py", line 513, in render
[2010-12-15 11:59:58,400][openerp6basic] ERROR:web-services:[36]:     tags[n.tag](n)
[2010-12-15 11:59:58,400][openerp6basic] ERROR:web-services:[37]:   File "/usr/lib/python2.6/site-packages/openerp-server/report/render/rml2pdf/trml2pdf.py", line 438, in _image
[2010-12-15 11:59:58,400][openerp6basic] ERROR:web-services:[38]:     img = ImageReader(s)
[2010-12-15 11:59:58,400][openerp6basic] ERROR:web-services:[39]:   File "/usr/lib/python2.6/site-packages/reportlab/lib/utils.py", line 541, in __init__
[2010-12-15 11:59:58,401][openerp6basic] ERROR:web-services:[40]:     if _isPILImage(fileName):
[2010-12-15 11:59:58,401][openerp6basic] ERROR:web-services:[41]:   File "/usr/lib/python2.6/site-packages/reportlab/lib/utils.py", line 521, in _isPILImage
[2010-12-15 11:59:58,401][openerp6basic] ERROR:web-services:[42]:     return isinstance(im,Image.Image)
[2010-12-15 11:59:58,401][openerp6basic] ERROR:web-services:[43]: AttributeError: 'NoneType' object has no attribute 'Image'
[2010-12-15 11:59:58,526][?] DEBUG_RPC:service:'report'
[2010-12-15 11:59:58,526][?] DEBUG_RPC:method:'report_get'
[2010-12-15 11:59:58,526][?] DEBUG_RPC:params:['openerp6basic', 1, '*', 1]
[2010-12-15 11:59:58,526][openerp6basic] DEBUG_RPC:exception:u'warning -- \'NoneType\' object has no attribute \'Image\'\n\n(<type \'exceptions.AttributeError\'>, AttributeError("\'NoneType\' object has no attribute \'Image\'",), <traceback object at 0x9d6d16c>)'
[2010-12-15 11:59:58,527][openerp6basic] DEBUG:web-services:netrpc: rpc-dispatching exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/openerp-server/service/netrpc_server.py", line 70, in run
    result = self.dispatch(msg[0], msg[1], msg[2:])
  File "/usr/lib/python2.6/site-packages/openerp-server/netsvc.py", line 499, in dispatch
    raise OpenERPDispatcherException(e, tb_s)
OpenERPDispatcherException

_____________________________________________________





References