Tags


py file

from openerp.osv import fields, osv

def _a_text(self, cursor, user, ids, name, arg, context=None):
res = {}
for order in self.browse(cursor, user, ids, context=context):
res[order.id] = order.name
return res
class sale(osv.osv):
_inherit = “sale.order”
_columns = {
‘a_name’: fields.function(_a_text, string=’Amount Total (Text)’, type=’char’),
}

xml file

<field name=”a_name”/>

Advertisements