Odoo Help


AttributeError: 'tuple' object has no attribute 'replace'???

eoin ahern
on 3/23/14, 5:46 AM 4,391 views

in openerp-server.log i get this error message.

File "C:\OpenERP 7.0-20140221-003045\Server\server.\openerp\modules\registry.py", line 118, in load File "C:\OpenERP 7.0-20140221-003045\Server\server.\openerp\osv\orm.py", line 937, in create_instance File "C:\OpenERP 7.0-20140221-003045\Server\server.\openerp\osv\orm.py", line 988, in __init__ AttributeError: 'tuple' object has no attribute 'replace'

cant really figure out what it is as i have another module with a different name that has roughly the same syntax and it starts up fine? here is my model

from openerp.osv import osv, fields

class Products(osv.Model):
    _name = 'products.products',
    _columns = {
        'Name': fields.text('Prod Name', size=100),
        'Code': fields.text('Code'),
        'Sku': fields.text('SKU', size=30),
        'Description': fields.text('Description'),
        'SalePriceWithVAT': fields.float('Sale Price + VAT'),
        'Group': fields.float('Group'),
        'Id': fields.text('ID'),
        'ApplicationId': fields.text('App ID'),

iam stumped yet again with this stuff. at least the module is actually showing up in the list now though. any help is appreciated

for some reason orm.py thinks my _name value is a tuple. i seem to be fixing other errors in orm.py also. dont want to mess around with the source too much tbh. i just want to create my own module.

eoin ahern
on 3/23/14, 8:12 AM

Med Said BARA

--Med Said BARA--

| 5 5 7
--Med Said BARA--
Med Said BARA
On 3/23/14, 6:59 PM


Rename Products.py to products.py

No comma after "_name = 'products.products'"

webcall = WebCall.WebCall(" my....)

Check Indentation in your files.

On my side i'm getting this error:

ile "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 165, in load_module_graph init_module_models(cr, package.name, models)

File "/usr/lib/pymodules/python2.7/openerp/modules/module.py", line 378, in init_module_models obj.init(cr)

File "/usr/lib/pymodules/python2.7/openerp/addons/produits/produits.py", line 16, in init webcall.makecall()

File "/usr/lib/pymodules/python2.7/openerp/addons/produits/WebCall.py", line 16, in makecall self.response = urllib2.urlopen(request,timeout=10)

File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout)

File "/usr/lib/python2.7/urllib2.py", line 392, in open protocol = req.get_type()

File "/usr/lib/python2.7/urllib2.py", line 254, in get_type raise ValueError, "unknown url type: %s" % self.__original ValueError: unknown url type: my web url goes here!!

What do you think?

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 3/23/14, 5:46 AM
Seen: 4391 times
Last updated: 3/16/15, 8:10 AM