Odoo Help

Welcome!

This community 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.

0

programming error column does not exist

By
Eric
on 3/13/14, 6:14 PM 1,553 views

Hello, I am getting a new error when I try to search for some records

ProgrammingError: column product_sql_version.product_id does not exist LINE 1: ...sion."database_server",product_sql_version."name",product_sq...

Im not sure why this is happening because I am not referencing product_sql_version.product_id anywhere in my code, so I dont understand why it thinks that I am. Here is a sample of my code

def on_change_get_sql_ver_set(self, cr, uid, ids, sql_ver_id, context=None):
    if sql_ver_id:
        sql_ver_obj = self.pool.get('product.sql.version')
        sql_rec = sql_ver_obj.browse(cr, uid, sql_ver_id)
        ids_set = sql_ver_obj.search(cr, uid, [('database_server','=', sql_rec.database_server)])
        recs = {}
        recs['product_sql_version_id'] = ids_set
        return {'value': recs}

I created a new table called product_sql_version and it has fields named: version, database_server, and name. It does not have a field named product_id. What I am trying to do is return a list of ids to a many2one field based on a selection from another many2one field, but it gives an error because it thinks I am referencing a product_id field that doesnt exist. Does anyone know why this is happening?

here is what the entire error says

OpenERP Server Error Client Traceback (most recent call last): File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server\openerp\addons\web\http.py", line 204, in dispatch File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server\openerp\addons\web\controllers\main.py", line 1128, in call_kw File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server\openerp\addons\web\controllers\main.py", line 1120, in _call_kw File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server\openerp\addons\web\session.py", line 42, in proxy File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server\openerp\addons\web\session.py", line 30, in proxy_method File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server\openerp\addons\web\session.py", line 103, in send

Server Traceback (most recent call last): File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server\openerp\addons\web\session.py", line 89, in send File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server.\openerp\netsvc.py", line 292, in dispatch_rpc File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server.\openerp\service\web_services.py", line 626, in dispatch File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server.\openerp\osv\osv.py", line 188, in execute_kw File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server.\openerp\osv\osv.py", line 131, in wrapper File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server.\openerp\osv\osv.py", line 197, in execute File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server.\openerp\osv\osv.py", line 185, in execute_cr File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server\openerp\addons\sale_custom\sale_custom.py", line 51, in on_change_get_sql_ver_set File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server.\openerp\osv\orm.py", line 484, in __getattr__ File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server.\openerp\osv\orm.py", line 399, in __getitem__ File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server.\openerp\osv\orm.py", line 3604, in read File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server.\openerp\osv\orm.py", line 3656, in _read_flat File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server.\openerp\sql_db.py", line 161, in wrapper File "C:\Program Files (x86)\OpenERP 7.0-20130722-231026\Server\server.\openerp\sql_db.py", line 226, in execute ProgrammingError: column product_sql_version.product_id does not exist LINE 1: ...sion."database_server",product_sql_version."name",product_sq...

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 3/13/14, 6:14 PM
Seen: 1553 times
Last updated: 3/16/15, 8:10 AM