Monday, September 19, 2011

OpenERP - Python - AttributeError: 'tuple' object has no attribute 'copy'

While OpenERP is a time saver for many aspects of writing a DB oriented app. Many aspects of the framework are left to the python and thus the framework.

I spent hours searching for this one...

AttributeError: 'tuple' object has no attribute 'copy'

I am too much use to declarative language like Java... so I still miss some basic reflex... This error was in the definitions of my class object:

lass bemedicalworksheet (osv.osv):
    _name = 'nisf.bemedicalworksheet'
    _columns = {
                'vipowigw': fields.boolean("Wigw"),
                },


well this last coma makes python thinking it is a tuple instead of a dictionnary...

No comments: