SHOW:
|
|
- or go back to the newest paste.
| 1 | ############################################################################## | |
| 2 | ||
| 3 | from osv import osv, fields | |
| 4 | from tools.translate import _ | |
| 5 | ||
| 6 | class res_partner(osv.osv): | |
| 7 | _inherit = 'res.partner' | |
| 8 | ||
| 9 | ||
| 10 | def _mycol(self, cr, uid, ids, name, arg, context=None): | |
| 11 | res = {}
| |
| 12 | for id in ids: | |
| 13 | record = self.browse(cr, uid, id) | |
| 14 | - | res.update({id:record.mycol})
|
| 14 | + | res.update({id:record.MyCol})
|
| 15 | return res | |
| 16 | ||
| 17 | ||
| 18 | _columns = {
| |
| 19 | 'mycol': fields.char('MyCol', size=16, help='Operator short code'),
| |
| 20 | 'mycol2' : fields.function(_mycol, type='char', size=16, method=True, store=False, multi=False) | |
| 21 | } | |
| 22 | ||
| 23 | res_partner() |