When I try to put a column in my custom module called create_date, i get the following error.
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/opt/openerp/server/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs)
File "/opt/openerp/server/openerp/osv/osv.py", line 197, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/openerp/server/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/openerp/server/openerp/osv/orm.py", line 4434, in create
cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new$
File "/opt/openerp/server/openerp/sql_db.py", line 161, in wrapper
return f(self, *args, **kwargs)
File "/opt/openerp/server/openerp/sql_db.py", line 226, in execute
res = self._obj.execute(query, params)
ProgrammingError: column "create_date" specified more than once
LINE 1: ...d,"attachment_id","create_date","name",create_uid,create_dat...
I am assuming this is because openerp automatically creates a column called create_date, which is fine. But how do i access that information in my XML file?
I get the following error when I try to access create_date in the XML without decalring it in the python file.
Can't find field 'create_date' in the following view parts composing the view of object model 'custom module': * custom.module.tree
Either you wrongly customized this view, or some modules bringing those views are not compatible with your current data model
So I cannot define the column create_date, and i cannot access it in the XML views unless it is defined. What should i do to display the column created by openerp to the user?
Creating my own field to store the creation data seems duplicative and silly.
↧