Modification contraintes : planned <= milestone et target <= milestone
[OpenERP/todolist.git] / todolist.py
index 1a50abe..57adec9 100644 (file)
@@ -58,6 +58,8 @@ class Container(osv.Model):
 
     _name = "todolist.container"
 
+    _inherit = "mail.thread"
+
     _status = [("draft", "Draft"), ("pending", "Pending"), ("done", "Done")]
 
     _columns = {
@@ -86,7 +88,7 @@ class Container(osv.Model):
         ),
         (
             "target_before_milestone_constraint",
-            "CHECK(target < milestone)",
+            "CHECK(target <= milestone)",
             "The target date should be previous milestone date",
         ),
     ]
@@ -152,7 +154,7 @@ class Task(osv.Model):
         ),
         (
             "planned_before_milestone_constraint",
-            "CHECK(planned < milestone)",
+            "CHECK(planned <= milestone)",
             "The planned date should be previous milestone date",
         ),
         (
@@ -239,6 +241,8 @@ class Topic(osv.Model):
 
     _name = "todolist.topic"
 
+    _inherit = "mail.thread"
+
     _states = [("Active", "Active"), ("Inactive", "Inactive")]
 
     _columns = {