可以试试酱紫写
def _new_dirname(self, cr, uid, ids, field_name, arg, context):<br /> res = {}<br /> for product in self.browse(cr, uid, ids, context=context):<br /> res[product.id] = product.name +' '+ product.default_code<br /> return res<br /> _columns = {<br /> 'dirname':fields.function(_new_dirname, method=True, string='dirname',type='char',store=True)<br /> }<br />
想要更多还有
[检测到链接无效,已移除]