تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2595 أدوات العرض

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)

الصورة الرمزية
إهمال