),
(
"manday_sup_0_constraint",
- "CHECK(manday < 0)",
+ "CHECK(manday > 0)",
"The manday should be positive",
),
]
self.write(cr, uid, ids, {"state": "done"}, context=context)
return self
+ #chaque utilisateur voit seulement ces taches
def search(self, cr, user, args=[], offset=0, limit=None, order=None, context=None, count=False):
args.append(("create_uid", "=", user))
if len(args) != 1:
args.insert(0, "&")
return osv.Model.search(self, cr, user, args, offset, limit, order, context, count)
-
+ def write(self, cr, user, ids, vals, context=None):
+ if "milestone" in vals.keys():
+ for task in self.browse(cr, user, ids, context=context):
+ if task.container_id.milestone < vals["milestone"]:
+ vals["milestone"] = task.container_id.milestone
+ return osv.Model.write(self, cr, user, ids, vals, context)
class Topic(osv.Model):