Archive

Posts Tagged ‘Google’

openerp-server 5.0 and Python 2.7

Ubuntu Inside

Image by Kordite via Flickr

After upgrading Ubuntu to 11.04 I found the nasty surprise that openerpserver 5.0 could not create a new database because it threw the following error message:

ValueError: opcode JUMP_IF_FALSE_OR_POP not allowed (u’auto_picking and test_auto_picking()’)

After doing some quick research with Google, I found the following bug that is already fixed in openerp-server v6:

https://bugs.launchpad.net/openobject-server/+bug/673773

Since upgrading to openerp v6 at this time is not an option for me, I only needed to make a slight change to make openerp-server work with Python 2.6. I already had python 2.6 installed in my Ubuntu system, which I could check with the following command:

gustavo@gustavo-laptop:/usr/bin$ python2.6
Python 2.6.6 (r266:84292, Mar 25 2011, 19:36:32)
[GCC 4.5.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>>

Then I changed the openerp-server command at my /usr/local/bin directory. I only needed to change the

exec /usr/bin/python ./openerp-server.py $@

line to

exec /usr/bin/python2.6 ./openerp-server.py $@

And that is all I needed to do to get my system back to work

Cheers!

What to do when you get an error in OpenERP

January 30, 2011 2 comments
Cover of "American Splendor"

Cover of American Splendor

Well, this is a quick Sunday post. What to do when you get an error message when working with OpenERP. First thing to do is to read the message itself, it might give you information on what might be going wrong, such as no space left on the disk. Or insufficient permissions.

But sometimes you get a printout like this:

Operating System Locale : fr_CH.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 5.0.11
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 247, in dispatch
result = LocalService(service_name)(method, *params)
File “/usr/lib/python2.5/site-packages/openerp-server/netsvc.py”, line 76, in __call__
return getattr(self, method)(*params)
File “/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py”, line 633, in execute
return self._execute(db, uid, wiz_id, datas, action, context)
File “/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py”, line 613, in _execute
return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
File “/usr/lib/python2.5/site-packages/openerp-server/wizard/__init__.py”, line 178, in execute
res = self.execute_cr(cr, uid, data, state, context)
File “/usr/lib/python2.5/site-packages/openerp-server/wizard/__init__.py”, line 73, in execute_cr
action_res = action(self, cr, uid, data, context)
File “/usr/lib/python2.5/site-packages/openerp-server/addons/sale/wizard/make_invoice_advance.py”, line 65, in _createInvoices
val = obj_lines.product_id_change(cr, uid, [], data[‘form’][‘product_id’],uom = False, partner_id = sale.partner_id.id, fposition_id=sale.fiscal_position.id)
TypeError: product_id_change() got an unexpected keyword argument ‘fposition_id’

And you can’t make anything out of this. So… what do you do in this situation? Well, you can jump into Google and search for the error message

TypeError: product_id_change() got an unexpected keyword argument ‘fposition_id’

The first entry in the results is a bug notification in Launchpad. Checking the bug you can see there is a patch for the problem and that the bug is fixed. So download the patch and apply it with the patch utility.

Just to finish this post, you should watch this wonderful movie, American Splendor. I don’t get tired of watching it.

Cheers!