通过Web界面创建模块

时间:2013-08-05 17:22:42

标签: openerp

我按照以下步骤创建了一个名为“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:

跟踪(最近一次呼叫最后一次):

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

我对通过Web Interface创建模块的问题是否有任何错误

1 个答案:

答案 0 :(得分:0)

我有同样的问题,进入数据库并在表格x_test中创建你在模型中添加的字段。

就我而言,它应该为你创建字段。但我不得不手动创建字段。