Hello hda,

This is the code without unique sequence No., 
from osv import osv, fields

class person_unique(osv.osv):
_name = 'person.unique'

def write(self, cr, user, vals, context=None):
vals['name'] = vals['stat'] + vals['dist']
return super(person_unique,self).create(cr, user, vals, context)

def create(self, cr, user, vals, context=None):
vals['name'] = vals['stat'] + vals['dist']
return super(person_unique,self).create(cr, user, vals, context)

_columns = {
'name': fields.char('Farmer Unique 
ID',size=64,required=True,select=1,readonly=True,),
'stat': fields.char('State',size=32,required=True),
'dist': fields.char('District',size=32,required=True),
'farmerid': fields.char('Farmer ID',size=32,required=True)
}

_defaults = {

            }

person_unique() 
------------------------------------

but after importing the module, when i click on the menu, the following error 
occurred


View error

Can't find field 'stat' in the following view parts composing the view of 
object model 'person.unique':
 * person.unique.tree

Either you wrongly customised this view, or some modules bringing those views 
are not compatible with your current data model

Can u please tell where iam doing mistake, i left  _defaults = {} empty and i 
didn't created unique_sequence.xml file

Thank you




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=40632#40632

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to