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

In my form view I have added a simple button of type object-

button name="load_operator_name" type="object" class="btn-primary" string='load data' special="load_operator_name"

And in my python model file I have added the function call-



    def load_operator_name(self):       

  ​if self.nextshift2 != True and self.nextshift3 != True:            

​self.operator = self.env.uid            

​code=self.env['hr.employee'].search([('user_id','=',self.operator.id)]).personal_code            ​if code:                

​self.operator_personal_code = code           

​ else:                

​self.operator_personal_code = ' '            

 



But on button click it's by default doing form validation. Like if there are any mandatory fields and
they are not filled, then it's throwing "The following fields are invalid:" Error.
How do I disable or skip the form validation?

will check all the required fields!

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
مايو 25
12
2
يناير 25
2439
1
ديسمبر 24
6148
1
نوفمبر 24
2586
1
نوفمبر 24
1914