If you want to use transaction_fields in OpenERP(Odoo) follow the below mentioned code and paste it in your model.py file: -
def name_get(self, cr, user, ids, context={}):
if not len(ids):
return []
res = []
for r in self.read(cr, user, ids, [name,zip,city]):
addr = str(r[name] or )
if r[name] and (r[zip] or r[city]):
addr += ,
addr += str(r[zip] or ) + + str(r[city] or )
res.append((r[id], addr))
return res
Note- With the help of this code we will set transaction field.
0 Comment(s)