Page 1 of 2
account_invoice_create error
Posted:
Fri Nov 13, 2009 6:09 am
by rbanks
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
Re: account_invoice_create error
Posted:
Fri Nov 13, 2009 12:24 pm
by sraps
Please check if you have partner (field - Associated Partner) specified for every analytic account for analytic entries you are invoicing.
Kaspars
Re: account_invoice_create error
Posted:
Fri Nov 13, 2009 3:52 pm
by rbanks
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
Re: account_invoice_create error
Posted:
Fri Nov 13, 2009 5:14 pm
by rbanks
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
Re: account_invoice_create error
Posted:
Mon Nov 16, 2009 11:31 am
by sraps
Please have the latest version of Invoicing.
Kaspars
Re: account_invoice_create error
Posted:
Mon Nov 23, 2009 2:55 am
by rbanks
After upgrading to the latest version of OpenERP and the module it appears to be working.
Re: account_invoice_create error
Posted:
Thu Feb 04, 2010 2:20 pm
by catinga
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
Re: account_invoice_create error
Posted:
Thu Feb 04, 2010 6:42 pm
by catinga
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
Re: account_invoice_create error
Posted:
Fri Feb 05, 2010 11:20 am
by sraps
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
Re: account_invoice_create error
Posted:
Fri Feb 05, 2010 7:53 pm
by catinga
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...