Hi Naresh,
Thank you for ur reply
Modified code as you said, as follows:
class person_code(osv.osv):
_name = 'person.code'
def _f_code(self, cr, uid, ids, field_name, arg, context={}):
res = {}
for obj in self.browse(cr,uid,ids):
res[obj.id] = obj.code1 + obj.code2 + obj.code3
return res
_columns = {
'finalcode': fields.function(_f_code,type='char',method=True,string='Final
Code',size=32,readonly=True),
'code1': fields.char('code1',size=32),
'code2': fields.char('code2',size=32),
'code3': fields.char('code3',size=32),
}
person_code()
The following error occurred:
Environment Information :
System : Windows-XP-5.1.2600-SP2
OS Name : nt
Operating System Release : XP
Operating System Version : 5.1.2600
Operating System Architecture : 32bit
Operating System Locale : en_US.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 5.0.2
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call
last):
File "netsvc.pyo", line 240, in dispatch
File "netsvc.pyo", line 73, in __call__
File "service\web_services.pyo", line 583, in execute
File "osv\osv.pyo", line 59, in wrapper
File "osv\osv.pyo", line 119, in execute
File "osv\osv.pyo", line 111, in execute_cr
File "osv\orm.pyo", line 2054, in read
File "osv\orm.pyo", line 2165, in _read_flat
File "osv\fields.pyo", line 631, in get
File "C:\Program Files\OpenERP
AllInOne\Server\addons\farmerunique.zip\farmerunique\farmeruniqueid.py", line
78, in _f_code
TypeError: unsupported operand type(s) for +: 'browse_record' and
'browse_record'
Thank you
-------------------- m2f --------------------
--
http://www.openobject.com/forum/viewtopic.php?p=41233#41233
-------------------- m2f --------------------
_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users