-1
我只是修改我的OpenERP,但是......我有点糊涂了比较字符串两场
如何比较场A和场B,但它不应该是相同的字符串
这是我的代码
def check_description(self, cr, uid,ids, context=None):
field = self.browse(cr, uid, ids, context=context)
check = True
for field in fields:
check = check and (not field.A==field.B)
return check
_constraints = [(_check_description, 'Please use a different string',['Warning','Description'])]
但是......我用on_change打电话。有没有响应
请帮助我。感谢的