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

create object via web-interface

By
Atchuthan - Technical Consultant, Sodexis Inc
on 8/5/13, 3:15 PM 920 views

Hi friendz,

I followed the following steps to create a module named "x_test" :

1. Settings -->Technical --> Database Structure --> Models --> Create
Model Description : Test
Model :x_test

2. Add Fields
Name: x_sample
Field Label: sample
Field Type: boolean

3. Save 

4. Click on Create a Menu

5. Select appropriate menu and click on "CREATE MENU"

6. Click on the menu provided and try to provide values for my custom module

7. When I "SAVE" my record, I am getting the following error:

Traceback (most recent call last):

 File "/var/app/openerp/server/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/var/app/openerp/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/var/app/openerp/server/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/var/app/openerp/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/var/app/openerp/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/var/app/openerp/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/var/app/openerp/server/openerp/osv/orm.py", line 4434, in create
    cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new)+upd1+')', tuple(upd2))
  File "/var/app/openerp/server/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/var/app/openerp/server/openerp/sql_db.py", line 228, in execute
    res = self._obj.execute(query, params)
ProgrammingError: column "x_sample" of relation "x_test" does not exist
LINE 1: insert into "x_test" (id,"x_sample",create_uid,create_date,wri...

Is there any mistake in my regards of creating a module via Web Interface

When I checked using "Eclipse Debugger mode", field not available in the module

Check your steps again. Check that when you save the field, you also save the model. Check that the model has the field. I followed your exact steps and was about to create a new 'Test' record and set the 'Sample' field to True.

Bista Solutions US, Ray Carnes
on 8/5/13, 11:27 PM

So there is no error in my steps...

Atchuthan - Technical Consultant, Sodexis Inc
on 8/6/13, 3:49 AM

Always save the model first, then add columns for the model

Atchuthan
on 8/14/13, 7:35 AM

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: 8/5/13, 3:15 PM
Seen: 920 times
Last updated: 3/31/15, 5:37 PM