X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=topic.py;h=043f74574569b7a1a018f55cb5587097a1a68159;hb=HEAD;hp=a163f3fbb512546f54425efe22a7d1589351d341;hpb=f9a1f5ae89a5b682ff81461dba6b5333e4d54f6a;p=OpenERP%2Fsemantics.git diff --git a/topic.py b/topic.py index a163f3f..043f745 100644 --- a/topic.py +++ b/topic.py @@ -6,6 +6,17 @@ class Topic(osv.Model): _name = "semantics.topic" - columns = { - "name": fields.char(size="64", "Title", required=True), - } \ No newline at end of file + _inherit = "mail.thread" + + _columns = { + "name": fields.char(string="Title", size=256, required=True), + "description": fields.text(string="Description"), + } + + _sql_constraints = [ + ( + "name_different_from_description_constraint", + "CHECK(name <> description)", + "Fields name and description should be different", + ), + ] \ No newline at end of file