account_invoice_create error

account_invoice_create error

Postby rbanks » Fri Nov 13, 2009 6:09 am

I am getting the following when I try to create an invoice after clicking on "Invoice analytic lines":

Traceback (most recent call last):
File "/usr/local/openerp/bin/netsvc.py", line 231, in dispatch
result = LocalService(service_name)(method, *params)
File "/usr/local/openerp/bin/netsvc.py", line 74, in __call__
return getattr(self, method)(*params)
File "/usr/local/openerp/bin/service/web_services.py", line 552, in execute
return self._execute(db, uid, wiz_id, datas, action, context)
File "/usr/local/openerp/bin/service/web_services.py", line 532, in _execute
return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
File "/usr/local/openerp/bin/wizard/__init__.py", line 178, in execute
res = self.execute_cr(cr, uid, data, state, context)
File "/usr/local/openerp/bin/wizard/__init__.py", line 83, in execute_cr
res['action'] = result_def['action'](self, cr, uid, data, context)
File "/usr/local/openerp/bin/addons/account_invoice_create.zip/account_invoice_create/wizard/account_invoice_create.py", line 80, in _do_create
partner_ids = data['form']['partners'][0][2]
TypeError: 'int' object is unsubscriptable
rbanks
 
Posts: 26
Joined: Sat Jun 13, 2009 1:19 am

Re: account_invoice_create error

Postby sraps » Fri Nov 13, 2009 12:24 pm

Please check if you have partner (field - Associated Partner) specified for every analytic account for analytic entries you are invoicing.

Kaspars
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

Re: account_invoice_create error

Postby rbanks » Fri Nov 13, 2009 3:52 pm

Now I get the following:

Traceback (most recent call last):
File "/usr/local/openerp/bin/netsvc.py", line 231, in dispatch
result = LocalService(service_name)(method, *params)
File "/usr/local/openerp/bin/netsvc.py", line 74, in __call__
return getattr(self, method)(*params)
File "/usr/local/openerp/bin/service/web_services.py", line 552, in execute
return self._execute(db, uid, wiz_id, datas, action, context)
File "/usr/local/openerp/bin/service/web_services.py", line 532, in _execute
return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
File "/usr/local/openerp/bin/wizard/__init__.py", line 178, in execute
res = self.execute_cr(cr, uid, data, state, context)
File "/usr/local/openerp/bin/wizard/__init__.py", line 83, in execute_cr
res['action'] = result_def['action'](self, cr, uid, data, context)
File "/usr/local/openerp/bin/addons/account_invoice_create.zip/account_invoice_create/wizard/account_invoice_create.py", line 127, in _do_create
'name': unicode(time.strftime('%D')+' - '+partner.name, "UTF-8")[:64],
TypeError: decoding Unicode is not supported
rbanks
 
Posts: 26
Joined: Sat Jun 13, 2009 1:19 am

Re: account_invoice_create error

Postby rbanks » Fri Nov 13, 2009 5:14 pm

I tried this on your demo and got the following:

Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/openerp-server/netsvc.py", line 235, in dispatch
result = LocalService(service_name)(method, *params)
File "/usr/lib/python2.4/site-packages/openerp-server/netsvc.py", line 74, in __call__
return getattr(self, method)(*params)
File "/usr/lib/python2.4/site-packages/openerp-server/service/web_services.py", line 582, in execute
return self._execute(db, uid, wiz_id, datas, action, context)
File "/usr/lib/python2.4/site-packages/openerp-server/service/web_services.py", line 562, in _execute
return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
File "/usr/lib/python2.4/site-packages/openerp-server/wizard/__init__.py", line 178, in execute
res = self.execute_cr(cr, uid, data, state, context)
File "/usr/lib/python2.4/site-packages/openerp-server/wizard/__init__.py", line 83, in execute_cr
res['action'] = result_def['action'](self, cr, uid, data, context)
File "/usr/lib/python2.4/site-packages/openerp-server/addons/account_invoice_create.zip/account_invoice_create/wizard/account_invoice_create.py", line 68, in _do_create
TypeError: unsubscriptable object
Last edited by rbanks on Mon Nov 16, 2009 9:01 pm, edited 1 time in total.
rbanks
 
Posts: 26
Joined: Sat Jun 13, 2009 1:19 am

Re: account_invoice_create error

Postby sraps » Mon Nov 16, 2009 11:31 am

Please have the latest version of Invoicing.

Kaspars
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

Re: account_invoice_create error

Postby rbanks » Mon Nov 23, 2009 2:55 am

After upgrading to the latest version of OpenERP and the module it appears to be working.
rbanks
 
Posts: 26
Joined: Sat Jun 13, 2009 1:19 am

Re: account_invoice_create error

Postby catinga » Thu Feb 04, 2010 2:20 pm

The thing is, I'm using the latest version (*) - 1.0 -, and I keep getting the error...

Code: Select all
partner_ids = data['form']['partners'][0][2]
TypeError: 'int' object is unsubscriptable


I'm quite sure every account has an associated partner (spent hours taking care of that) so it must be something else, I guess.







(*) by the way, changing the version number and displaying it in the module list (download section) would be really useful when it comes for the developer to know which version he's running
catinga
 
Posts: 5
Joined: Wed Feb 03, 2010 5:44 pm

Re: account_invoice_create error

Postby catinga » Thu Feb 04, 2010 6:42 pm

Hi Kaspar,

Found out the problem!
In the _do_create function, the line

Code: Select all
partner_ids = data['form']['partners'][0][2]


should turn to

Code: Select all
partner_ids=data['form']['partners']



I'm using...
OpenERP 5.0.6
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2
Ubuntu 9.10 Karmic Koala
catinga
 
Posts: 5
Joined: Wed Feb 03, 2010 5:44 pm

Re: account_invoice_create error

Postby sraps » Fri Feb 05, 2010 11:20 am

Hi,
is that so, that you are using a eTiny web client?
We have seen such differences mainly when somebody used OpenERP web client, as it has some annoying differences.

Please describe your environment more closely...

Beast regards,
Kaspars
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

Re: account_invoice_create error

Postby catinga » Fri Feb 05, 2010 7:53 pm

Yes, I'm using the web version of OpenERP. I still haven't tried the module with the client as it is not really the company's policy.

I'm not sure of the details you need. Please, guide me... :)
catinga
 
Posts: 5
Joined: Wed Feb 03, 2010 5:44 pm

Next

Return to Invoicing

cron
Copyright © 2001 Alistek Ltd., ALL RIGHTS RESERVED