X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=todolist.py;h=57adec93a6276653a6fb9d16a3f6f6a4a20e943c;hb=bf87c71690edf6e6cefb98bacb4e4a78d96eb60b;hp=5d0c6665ea1ee6963f524780e73007e0afbd54f2;hpb=1956444d7225153c63171bac049e2e69bfe87d78;p=OpenERP%2Ftodolist.git diff --git a/todolist.py b/todolist.py index 5d0c666..57adec9 100644 --- a/todolist.py +++ b/todolist.py @@ -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", ), ] @@ -120,6 +122,8 @@ class Task(osv.Model): _name = "todolist.task" + _inherit = "mail.thread" + _priorities = [("Useful", "Useful"), ("Necessary", "Necessary"), ("Essential", "Essential")] _states = [("draft", "Draft"), ("proposal", "Proposal"), ("approved", "Approved"), ("started", "Started"), ("done", "Done")] @@ -150,12 +154,12 @@ class Task(osv.Model): ), ( "planned_before_milestone_constraint", - "CHECK(planned < milestone)", + "CHECK(planned <= milestone)", "The planned date should be previous milestone date", ), ( "manday_sup_0_constraint", - "CHECK(manday > 0)", + "CHECK(manday >= 0)", "The manday should be positive", ), ] @@ -237,6 +241,8 @@ class Topic(osv.Model): _name = "todolist.topic" + _inherit = "mail.thread" + _states = [("Active", "Active"), ("Inactive", "Inactive")] _columns = {