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

Hey guys, I was hoping someone could check over my implementation.

I have defined this model (and only included the relevant parts)


class EstateProperty(models.Model): 

  expected_price = fields.Float(required=True)

  _sql_constraints = [        ('check_expected_price', 'CHECK(expected_price > 0)',         'The expected price should be positive')    ]


Is this wrong? When I try to save negative numbers onto my form, my system is allowing it. 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi, did you upgrade your module ?

Gus

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ย. 22
5619
2
พ.ย. 18
10199
1
มี.ค. 15
6044
4
มี.ค. 15
5232
1
มี.ค. 15
3605