自已来回复,
<br />class device_assets_category(osv.osv): <br /> '''Assets Category'''<br /> _name='device.assets.category'<br /> _columns={<br /> 'name':fields.char('Name',size=64,required=True,translate=True),<br /> }<br /> _sql_constraints = [<br /> ('device_assets_category_uniq', 'unique (name)', 'device assets category name must be unique.')<br /> ]<br />
加上"translatel"属性