If you want to show the database value and In the "traditional" style you can use method decorators.
Here parameters like the database cursor, user id, context dictionary and record ids (usually denoted as cr,uid, context, ids) are passed explicitly to all methods. In the "record" style, those parameters are hidden into model instances, which gives it a more object-oriented feel and context value.
For example you can see below example.
model = self.pool.get(MODEL)
ids = model.search(cr, uid, DOMAIN, context=context)
for rec in model.browse(cr, uid, ids, context=context):
print rec.test
model.write(cr, uid, ids, VALUES, context=context)env = Environment(cr, uid, context) # cr, uid, context wrapped in env
model = env[Test] # retrieve an instance of MODEL
recs = model.search(Test) # search returns a recordset
for rec in recs: # iterate over the records
print rec.name
recs.write(VALUES)
0 Comment(s)