Get error message when send email quotation using email template through GTK Client

Bug #769788 reported by jacky
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Power Email
New
Undecided
Unassigned

Bug Description

Hi, I m newbie in open erp system

May I know how to solve the "you do not have valid maintainance openerp contract" when i using "purchase order form" wizard in purchase order though GTK client.
Thanks !!!

jacky (openerp-jacky)
summary: Get error message when send email quotation using email template through
- web server
+ GTK Client
Revision history for this message
jacky (openerp-jacky) wrote :

Environment Information :
System : Windows-Vista-6.1.7600
OS Name : nt
Operating System Release : Vista
Operating System Version : 6.1.7600
Operating System Architecture : 32bit
I get this message

Operating System Locale : en_US.cp936
Python Version : 2.5.2
OpenERP-Client Version : 5.0.16
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "netsvc.pyo", line 299, in dispatch
  File "netsvc.pyo", line 77, in __call__
  File "service\web_services.pyo", line 577, in execute
  File "osv\osv.pyo", line 58, in wrapper
  File "osv\osv.pyo", line 119, in execute
  File "osv\osv.pyo", line 111, in execute_cr
  File "C:\Program Files\OpenERP AllInOne\Server\addons\powermail.zip\powermail\poweremail_send_wizard.py", line 161, in send_mail
  File "C:\Program Files\OpenERP AllInOne\Server\addons\powermail.zip\powermail\poweremail_send_wizard.py", line 195, in save_to_mailbox
KeyError: 0

Revision history for this message
Nautica (nautica1959) wrote :

Since my upgrade to from 5.0.14 to 5.0.16 i have the same error sending an invoice
I am running on Windows 7. Poweremail worked smooth before the upgrade

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

Could you please paste a more detailed stack trace ?

Revision history for this message
Nautica (nautica1959) wrote :

Environment Information :
System : Windows-32bit-SP1
OS Name : nt
Operating System Release :
Operating System Version : 32bit
Operating System Architecture : 32bit
Operating System Locale : nl_NL.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 5.0.16
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "netsvc.pyo", line 299, in dispatch
  File "netsvc.pyo", line 77, in __call__
  File "service\web_services.pyo", line 577, in execute
  File "osv\osv.pyo", line 58, in wrapper
  File "osv\osv.pyo", line 119, in execute
  File "osv\osv.pyo", line 111, in execute_cr
  File "C:\Users\Proline\OpenERP AllInOne\Server\addons\poweremail\poweremail_send_wizard.py", line 161, in send_mail
  File "C:\Users\Proline\OpenERP AllInOne\Server\addons\poweremail\poweremail_send_wizard.py", line 195, in save_to_mailbox
KeyError: 0

Revision history for this message
Nautica (nautica1959) wrote :

Traceback (most recent call last):
  File "widget\view\form_gtk\parser.pyo", line 142, in button_clicked
  File "rpc.pyo", line 170, in rpc_exec_auth
  File "rpc.pyo", line 113, in exec_auth
  File "rpc.pyo", line 119, in execute
  File "tiny_socket.pyo", line 81, in myreceive
tiny_socket.Myexception: ('0', 'Traceback (most recent call last):\n File "netsvc.pyo", line 299, in dispatch\n File "netsvc.pyo", line 77, in __call__\n File "service\\web_services.pyo", line 577, in execute\n File "osv\\osv.pyo", line 58, in wrapper\n File "osv\\osv.pyo", line 119, in execute\n File "osv\\osv.pyo", line 111, in execute_cr\n File "C:\\Users\\Proline\\OpenERP AllInOne\\Server\\addons\\poweremail\\poweremail_send_wizard.py", line 161, in send_mail\n File "C:\\Users\\Proline\\OpenERP AllInOne\\Server\\addons\\poweremail\\poweremail_send_wizard.py", line 195, in save_to_mailbox\nKeyError: 0\n')

Revision history for this message
Nautica (nautica1959) wrote :

Keyerror is raised when a mapping (dictionary) key is not found in the set of existing keys. It tries to access a non-existing dictionary key;

Line 195 in poweremail_send_wizard.py reads: screen_vals = self.read(cr, uid, ids[0], [],context)[0]

Do these values come from the template? Strange that this line did not change comparing to older revisions and always worked.

Revision history for this message
dx-vmonroig (dx-vmonroig) wrote :

This bug is appearing to us, too. First install in this server, so no upgrades:

Environment Information :
System : Linux-2.6.38-8-generic-x86_64-with-Ubuntu-11.04-natty
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
Operating System Release : 2.6.38-8-generic
Operating System Version : #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011
Operating System Architecture : 64bit
Operating System Locale : es_ES.UTF8
Python Version : 2.7.1+
OpenERP-Client Version : 5.0.15
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 299, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 77, in __call__
    return getattr(self, method)(*params)
  File "/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py", line 577, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/poweremail/poweremail_send_wizard.py", line 161, in send_mail
    mailid = self.save_to_mailbox(cr, uid, ids, context)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/poweremail/poweremail_send_wizard.py", line 195, in save_to_mailbox
    screen_vals = self.read(cr, uid, ids[0], [],context)[0]
KeyError: 0

Revision history for this message
dx-vmonroig (dx-vmonroig) wrote :

The problem can be solved changing line 195 in file poweremail_send_wizard.py:

Change
            screen_vals = self.read(cr, uid, ids[0], [],context)[0]
by:
            screen_vals = self.read(cr, uid, ids, [], context)[0]

Recompile poweremail module and problem will gone!

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

Hi,

I hope comment #8 solves the problem.

For the records, we are heavily refactoring poweremail to make it better and make it more pythonic and extensible.

The source code is available here: https://bitbucket.org/openlabs/poweremail/overview

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.