_order = "planned"
+ _sql_constraints = [
+ (
+ "name_different_from_description_constraint",
+ "CHECK(name <> description)",
+ "Fields name and description should be different",
+ ),
+ ]
+
+
def action_draft(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {"state": "draft"}, context=context)
return self