Ajout contrainte pour topic : name <> description
[OpenERP/todolist.git] / todolist.py
index cc15f7f..a25878f 100644 (file)
@@ -206,3 +206,12 @@ class Topic(osv.Model):
     _defaults = {
         "activated": "Active",
     }
+
+
+    _sql_constraints = [
+        (
+            "name_different_from_description_constraint",
+            "CHECK(name <> description)",
+            "Fields name and description should be different",
+        ),
+    ]