Hello,
I'm not really sure how to use search function correctly lets say i want to find start_date based on the id?
Example
def end_date(self, cr, uid, ids, values, arg, context):
y = self.pool.get('pp.control')
other_table2 = y.search(cr, uid,[('id','=','4')])
this gives me result 4, but lets say if i want to retreave start_date from pp.control where id =4? is it possible with search? or is it possible to search the value with multiple conditions like id=4 and some_field=some_value?
Also i tried to do that with cr.execute, it works fine but the issue im facing that it gives me results like : ('2015-02-19',)
There is any way to get only 2015-02-19?
example code:
def end_date(self, cr, uid, ids, values, arg, context):
x={}
for record in self.browse(cr, uid, ids):
cr.execute("SELECT start_date FROM pp_control WHERE id = 4")
res = cr.fetchone()
x[record.id] = res
return x
Any help and examples would be appreciated
Thank you,