跳至內容
選單
此問題已被標幟
1 回覆
2738 瀏覽次數

How do I accept only capitals fields before creating a record?

頭像
捨棄
最佳答案

You have to override method create like this:

def create(self, cr, user, vals, context=None): # do something with values of field (in 'vals' dictionary)
return super(your_class, self).create(cr, user, vals, context=context)

頭像
捨棄