Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5226 มุมมอง

I need to get the value of selected checkboxes and perform a functin based on it.

please help

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด
class YourModel(models.Model):
    _name = 'your.model'
    your_select_field = fields.Boolean()
    def your_function(self):
        if self.your_select_field:
            #check box is checked condn
        else:
            # check box is not checked condn


You can give a button function to call your_function in xml.

อวตาร
ละทิ้ง